/* ── pricing.css ─────────────────────────────────────────────────────────── */

.pricing-main {
  padding: 60px 24px 80px;
  text-align: center;
}

.pricing-headline {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}

.pricing-sub {
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 48px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 20px;
  max-width: 960px;
  margin: 0 auto;
  align-items: stretch;
}

.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 24px;
  text-align: left;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  height: 100%;
  box-sizing: border-box;
}

.pricing-featured {
  border-color: var(--blue);
  background: var(--blue-dim);
}

.pricing-popular {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--blue);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 99px;
  white-space: nowrap;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.pricing-tier {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.pricing-price {
  font-size: 40px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}
.pricing-price span {
  font-size: 16px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0;
}

.pricing-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
  flex: 1;
}

.pricing-features li {
  font-size: 14px;
  color: var(--text);
  padding-left: 20px;
  position: relative;
  line-height: 1.4;
}
.pricing-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
}
.pricing-features li.pricing-no { color: var(--muted); }
.pricing-features li.pricing-no::before { content: "✕"; color: var(--hint); }

.pricing-btn {
  display: block;
  text-align: center;
  padding: 11px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  font-family: var(--sans);
  transition: filter 0.15s;
}
.pricing-btn.primary {
  background: var(--blue);
  color: #fff;
}
.pricing-btn.ghost {
  border: 1px solid var(--border2);
  color: var(--text);
}
.pricing-btn:hover { filter: brightness(1.1); }
/* #310: the signed-in user's current tier — inert, clearly "you're here". */
.pricing-btn-current { background: transparent; border: 1px dashed var(--border2); color: var(--muted); cursor: default; pointer-events: none; }
.pricing-btn-current:hover { filter: none; }

/* ── Currency switcher ─────────────────────────────────────────────────── */
.pricing-currency-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 36px;
}
.pricing-controls-row {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 960px;
  margin: 0 auto 32px;
  position: relative;
}
.pricing-controls-spacer {
  flex: 1;
}
.pricing-controls-right {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}
.pricing-currency-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
.pricing-currency-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 6px;
  border: 1px solid var(--border2);
  background: var(--surface2);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.pricing-currency-btn:hover { border-color: var(--blue); color: var(--blue); }
.pricing-currency-chevron { font-size: 10px; color: var(--hint); }

.pricing-currency-popup {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: 100%;
  max-height: 220px;
  overflow-y: auto;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 6px;
  z-index: 50;
  padding: 4px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
}
.pricing-currency-popup.open { display: block; }
.pricing-currency-option {
  padding: 8px 10px;
  font-size: 12px;
  font-family: var(--mono);
  color: var(--text);
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.1s;
  -webkit-tap-highlight-color: transparent;
  text-align: center;
}
.pricing-currency-option:hover { background: var(--border2); }
.pricing-currency-option.selected { color: var(--blue); font-weight: 600; }

/* ── Per-tier tagline + fineprint ──────────────────────────────────────── */
.pricing-tagline {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
  line-height: 1.4;
  min-height: 36px; /* keeps card heights aligned across tiers */
}

.pricing-fineprint {
  margin-top: 10px;
  font-size: 11px;
  color: var(--hint);
  text-align: center;
  min-height: 18px;
}

/* #297: Champion 7-day-trial gets the same badge+border treatment as Trader's
   "Most popular" — in a distinct gold/amber so the two premium cards read apart
   and the trial looks like a real, obvious offer. */
.pricing-trial-featured {
  border-color: var(--amber);
  background: color-mix(in srgb, var(--amber) 9%, var(--surface));
}
.pricing-trial-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--amber);
  color: #1a1208;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 12px;
  border-radius: 99px;
  white-space: nowrap;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.pricing-trial-note {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--amber);
  margin: -2px 0 8px;
}

.pricing-fair {
  font-size: 11px;
  color: var(--hint);
  font-style: italic;
}

.pricing-footnote {
  margin: 36px auto 0;
  max-width: 760px;
  font-size: 12px;
  color: var(--hint);
  line-height: 1.6;
  text-align: center;
  /* Fits on one line on a wide desktop; when it does wrap (tablet/mobile) balance
     the lines so the last two words never orphan onto their own line. */
  text-wrap: balance;
}

/* Badge wrapper at top of each pricing card */
.pricing-badge-wrap {
  margin-bottom: 12px;
}

/* ── Billing period toggle ── */
.pricing-billing-toggle {
  display: inline-flex;
  gap: 0;
  border: 1px solid var(--border2);
  border-radius: 8px;
  overflow: hidden;
  margin: 0;
  background: var(--surface2);
}
.pricing-billing-btn {
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--sans);
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 6px;
  -webkit-appearance: none;
  appearance: none;
}
.pricing-billing-btn:hover { color: var(--text); }
.pricing-billing-btn.active {
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
}


/* ── Mobile: horizontal scroll cards ── */
@media (max-width: 700px) {
  .pricing-main {
    padding: 40px 0 60px;
  }
  .pricing-headline,
  .pricing-sub,
  .pricing-controls-row,
  .pricing-footnote {
    padding-left: 20px;
    padding-right: 20px;
  }
  .pricing-grid {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 14px;
    padding: 8px 20px 20px;
    align-items: stretch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .pricing-grid::-webkit-scrollbar { display: none; }
  .pricing-card {
    flex: 0 0 78vw;
    max-width: 300px;
    min-width: 260px;
    scroll-snap-align: center;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    height: auto;
  }
  .pricing-features { flex: 1; }
  .pricing-swipe-hint { display: block; }
}

@media (min-width: 701px) {
  .pricing-swipe-hint {
    display: none;
  }
}

.pricing-swipe-hint {
  text-align: center;
  font-size: 11px;
  color: var(--hint);
  font-family: var(--mono);
  letter-spacing: 0.04em;
  padding: 0 20px 8px;
  display: none;
}

/* ── Mobile controls row ── */
@media (max-width: 700px) {
  .pricing-controls-row {
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding: 0 20px;
  }
  .pricing-controls-spacer { display: none; }
  .pricing-controls-right { flex: 0 0 auto; }
  .pricing-billing-toggle { margin: 0; }
}
