/* ───────────────────────────────────────────────────────────────────────
   pricing.css — styles for /pricing only. Lives alongside landing.css.
   Reuses the .lp-* hero/nav/footer styles for visual continuity; everything
   below is scoped under .pricing-* / details: never bleeds into other pages.
   ─────────────────────────────────────────────────────────────────────── */

/* ── Evaluation Preview banner ─────────────────────────────────────────
   Visible only while we're collecting internal feedback. Remove the
   element from pricing.html (and these rules) when the plan system goes
   live and the page is linked from nav. */
.pricing-preview-banner {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
  padding: .65rem 1.2rem;
  background: linear-gradient(90deg, rgba(245, 158, 11, .15) 0%, rgba(245, 158, 11, .08) 100%);
  border-bottom: 1px solid rgba(245, 158, 11, .25);
  font-size: .85rem;
  color: var(--fg);
  text-align: center;
  line-height: 1.5;
}
.pricing-preview-banner strong {
  color: #f59e0b;
  font-weight: 600;
}
.pricing-preview-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 8px rgba(245, 158, 11, .8);
  flex-shrink: 0;
}
.pricing-preview-link {
  color: #f59e0b;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(245, 158, 11, .4);
  text-underline-offset: 3px;
  margin-left: .4rem;
}
.pricing-preview-link:hover {
  text-decoration-color: #f59e0b;
}
/* Mobile: drop the descriptive middle text so the banner stays a single
   compact line ("· Evaluation preview · Feedback →"). The desktop view keeps
   the full sentence. */
@media (max-width: 720px) {
  .pricing-preview-banner {
    font-size: .78rem;
    padding: .5rem .8rem;
    gap: .4rem;
  }
  .pricing-preview-detail { display: none; }
  /* On mobile, the side-by-side compare table only shows one column at a
     time (needs a horizontal swipe to see the others). The plan cards above
     already cover the per-tier comparison when stacked, so just hide it. */
  .pricing-compare-section { display: none; }
}

/* Subtle grid background tinted to match the dark hero in landing.css. */
.pricing-body {
  background:
    radial-gradient(60% 70% at 50% 0%, rgba(124, 58, 237, .07) 0%, rgba(124, 58, 237, 0) 60%),
    linear-gradient(0deg, var(--bg) 0%, var(--bg) 100%);
  min-height: 100vh;
}

/* ── Hero ─────────────────────────────────────────────────────────────── */
.pricing-hero {
  max-width: 980px;
  margin: 0 auto;
  padding: 4.5rem 1.5rem 2rem;
  text-align: center;
}
.pricing-badge {
  margin: 0 auto;
  display: inline-flex;
}
.pricing-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, .6);
  margin-right: 4px;
}
.pricing-hero h1 {
  font-size: clamp(2.4rem, 5.5vw, 3.6rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.02em;
  margin-top: 1rem;
}
.pricing-hero h1 span {
  display: block;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-end) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.pricing-hero-sub {
  margin: 1.3rem auto 0;
  max-width: 640px;
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.6;
}
.pricing-hero-sub strong {
  color: var(--fg);
  font-weight: 600;
}

/* Billing-cycle toggle */
.pricing-toggle {
  display: inline-flex;
  margin-top: 2rem;
  padding: 4px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 999px;
  gap: 2px;
}
.pricing-toggle-opt {
  padding: .55rem 1.2rem;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 500;
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s, color .15s;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}
.pricing-toggle-opt:hover { color: var(--fg); }
.pricing-toggle-opt.is-active {
  background: var(--accent);
  color: #fff;
}
.pricing-toggle-save {
  background: rgba(16, 185, 129, .2);
  color: #10b981;
  font-size: .72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: .02em;
}
.pricing-toggle-opt.is-active .pricing-toggle-save {
  background: rgba(255, 255, 255, .2);
  color: #fff;
}

/* ── Sections ─────────────────────────────────────────────────────────── */
.pricing-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}
.pricing-section-head {
  text-align: center;
  margin-bottom: 2.5rem;
}
.pricing-section-kicker {
  font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: .8rem;
  color: var(--accent);
  letter-spacing: .04em;
}
.pricing-section h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -.01em;
  margin-top: .6rem;
}
.pricing-section h2 span {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-end) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.pricing-section-lead {
  max-width: 640px;
  margin: 1rem auto 0;
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ── Plan grid ────────────────────────────────────────────────────────── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
  align-items: stretch;
}
@media (max-width: 900px) {
  .pricing-grid { grid-template-columns: 1fr; }
}
.pricing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 2rem 1.6rem;
  background: rgba(255, 255, 255, .02);
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 14px;
  transition: border-color .2s, transform .2s;
}
.pricing-card:hover { border-color: rgba(255, 255, 255, .12); }
.pricing-card-featured {
  background: linear-gradient(180deg, rgba(124, 58, 237, .08) 0%, rgba(124, 58, 237, .03) 100%);
  border-color: var(--accent-end);
  box-shadow: 0 0 0 1px rgba(124, 58, 237, .35), 0 25px 60px -30px rgba(124, 58, 237, .6);
}
.pricing-card-ribbon {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-end);
  color: #fff;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .04em;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
}
.pricing-card-tier {
  display: inline-block;
  width: fit-content;
  font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: .75rem;
  font-weight: 700;
  color: #0B1120;
  letter-spacing: .12em;
  margin-bottom: 1rem;
  text-transform: uppercase;
  background: #fff;
  padding: 5px 11px;
  border-radius: 3px;
}
.pricing-card-price {
  display: flex;
  align-items: baseline;
  gap: .4rem;
  margin-bottom: .35rem;
}
.pricing-card-amount {
  font-size: 2.8rem;
  font-weight: 700;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.pricing-card-unit {
  font-size: .9rem;
  color: var(--muted);
}
/* "SAVE €X!" chip next to the price - only populated when the cycle toggle
   is on Annual (data-monthly="" clears it on Monthly). Hidden via :empty so
   it doesn't reserve space when not in use. */
.pricing-card-savings {
  display: inline-flex;
  align-items: center;
  background: rgba(16, 185, 129, .15);
  color: #10b981;
  font-size: .72rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  letter-spacing: .02em;
  margin-left: .35rem;
  white-space: nowrap;
}
.pricing-card-savings:empty { display: none; }
.pricing-card-included {
  font-size: .85rem;
  color: var(--muted);
  margin: 0 0 1.4rem;
  line-height: 1.5;
}
.pricing-card-included code {
  background: rgba(255, 255, 255, .04);
  color: var(--fg);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: .82rem;
  font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace);
}
.pricing-card-cta {
  display: block;
  text-align: center;
  padding: .85rem 1rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: .95rem;
  transition: background .15s, transform .1s, border-color .15s;
  margin-bottom: 1.5rem;
}
.pricing-card-cta:hover { transform: translateY(-1px); }
.pricing-card-cta-outline {
  background: rgba(255, 255, 255, .04);
  color: var(--fg);
  border: 1px solid rgba(255, 255, 255, .1);
}
.pricing-card-cta-outline:hover {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .18);
}
.pricing-card-cta-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-end) 100%);
  color: #fff;
}
.pricing-card-cta-primary:hover { filter: brightness(1.1); }

.pricing-card-header {
  font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: .72rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .08em;
  margin-bottom: .8rem;
  text-transform: uppercase;
}
.pricing-card-header::before {
  content: "// ";
  color: var(--muted);
}
.pricing-card-header strong {
  color: var(--fg);
  font-weight: inherit;
}
.pricing-card-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1.4rem;
  flex: 1;
}
.pricing-card-features li {
  font-size: .92rem;
  color: var(--fg);
  padding: .55rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, .04);
  line-height: 1.4;
}
.pricing-card-features li:last-child { border-bottom: none; }
.pricing-card-features li strong { color: var(--fg); font-weight: 600; }
.pricing-card-features li code {
  background: rgba(124, 58, 237, .1);
  color: var(--accent-end);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: .82rem;
  font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace);
}

/* Inline eval brand mark used in feature lists and the compare table. The
   stock SVG is white, so the light-theme override inverts it. */
.pricing-feature-eval-logo {
  height: 0.95em;
  width: auto;
  vertical-align: -0.1em;
  display: inline-block;
  margin-right: 2px;
}
html[data-theme="light"] .pricing-feature-eval-logo {
  filter: invert(1);
  opacity: .85;
}

/* Light-mode: tier chips invert to blue background with white text, since
   the dark-mode white-on-dark would disappear against the light page. */
html[data-theme="light"] .pricing-card-tier {
  background: var(--accent, #3B82F6);
  color: #fff;
}

/* Light-mode: outline CTA buttons (Start free, Request Scale access) lose
   all contrast in dark-mode's translucent-white styling, so swap to a real
   accent-blue outline + tinted hover state for visibility. */
html[data-theme="light"] .pricing-card-cta-outline {
  background: transparent;
  color: var(--accent, #3B82F6);
  border: 1.5px solid var(--accent, #3B82F6);
}
html[data-theme="light"] .pricing-card-cta-outline:hover {
  background: rgba(59, 130, 246, .08);
  border-color: var(--accent, #3B82F6);
}

/* Inline link inside a feature bullet — subtle underline that brightens on
   hover, signals "this is a CTA you can click" without competing with the
   primary plan button. Used for the Custom-pipelines CTA only. */
.pricing-feature-link {
  color: var(--accent, #7c3aed);
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
  transition: opacity .15s;
}
.pricing-feature-link:hover { opacity: .8; }

/* Subtle external-link icon for "learn more" hops (MCP docs, eval landing).
   Stays out of the way at 40% opacity, brightens on hover so the user sees
   it's clickable without the line looking decorated. */
.pricing-feature-extlink {
  display: inline-flex;
  align-items: center;
  margin-left: 4px;
  color: currentColor;
  opacity: .4;
  transition: opacity .15s;
  vertical-align: -1px;
}
.pricing-feature-extlink:hover { opacity: 1; }

/* "What your bundle buys" table - large quantities are the headline so they
   render in a slightly heavier font and aligned right for easy scanning. */
.pricing-bundle-table td {
  font-variant-numeric: tabular-nums;
  font-size: 1.05rem;
  font-weight: 600;
  text-align: right;
}
.pricing-compare thead th .pricing-card-tier {
  margin-bottom: 0;
}
.pricing-bundle-table th small {
  display: block;
  font-weight: 400;
  font-size: .7rem;
  color: var(--muted);
  margin-top: 2px;
  letter-spacing: 0;
}
.pricing-bundle-unit {
  text-transform: none;
}

/* Tiny qualifier chip used inline next to a feature label (e.g. "on request"
   next to Custom pipelines). Reads as a tag, not a parenthetical aside. */
.pricing-feature-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .04em;
  line-height: 1;
  text-transform: uppercase;
  background: rgba(255, 255, 255, .06);
  color: var(--muted);
  padding: 4px 8px 3px;
  border-radius: 999px;
  vertical-align: middle;
  margin: 0 2px;
}

/* Overage callout — small, muted, but always visible on the card. */
.pricing-card-overage {
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .05);
  border-radius: 8px;
  padding: .75rem .9rem;
  font-size: .78rem;
  color: var(--muted);
  line-height: 1.5;
}
.pricing-card-overage strong {
  color: var(--fg);
  font-weight: 600;
}
.pricing-card-overage code {
  background: rgba(255, 255, 255, .06);
  color: var(--fg);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: .75rem;
}

/* Enterprise CTA bar below the grid */
.pricing-enterprise {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
  padding: 1.2rem 1.6rem;
  background: rgba(255, 255, 255, .02);
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 12px;
}
.pricing-enterprise-text {
  font-size: .95rem;
  color: var(--muted);
}
.pricing-enterprise-text strong {
  color: var(--fg);
  font-weight: 600;
}

/* ── How it bills (credit work) ───────────────────────────────────────── */
.pricing-creditwork {
  padding-top: 4rem;
  padding-bottom: 4rem;
}
.pricing-credits-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
  margin-top: 1rem;
}
@media (max-width: 1024px) {
  .pricing-credits-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .pricing-credits-grid { grid-template-columns: 1fr; }
}
.pricing-credit-card {
  padding: 1.6rem;
  background: rgba(255, 255, 255, .02);
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 12px;
}
.pricing-credit-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(59, 130, 246, .18) 0%, rgba(124, 58, 237, .18) 100%);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}
.pricing-credit-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 .6rem;
}
.pricing-credit-card p {
  font-size: .92rem;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}
.pricing-credit-card p code,
.pricing-creditwork-note code {
  background: rgba(124, 58, 237, .1);
  color: var(--accent-end);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: .85rem;
  font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace);
}
.pricing-creditwork-note {
  margin-top: 1.6rem;
  font-size: .9rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.6;
}

/* ── Comparison table ─────────────────────────────────────────────────── */
.pricing-compare-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.pricing-compare {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
}
.pricing-compare th,
.pricing-compare td {
  padding: .8rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, .04);
}
.pricing-compare thead th {
  font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: .8rem;
  letter-spacing: .08em;
  color: var(--muted);
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.pricing-compare tbody th {
  color: var(--fg);
  font-weight: 500;
  white-space: nowrap;
}
.pricing-compare td {
  color: var(--muted);
}
.pricing-compare .is-featured {
  background: rgba(124, 58, 237, .05);
  color: var(--fg);
}

/* ── FAQ ──────────────────────────────────────────────────────────────── */
.pricing-faq {
  max-width: 820px;
  margin: 0 auto;
}
.pricing-faq details {
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  padding: 1.1rem 0;
}
.pricing-faq details:first-child { border-top: 1px solid rgba(255, 255, 255, .06); }
.pricing-faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--fg);
  padding: .2rem 1.1rem;
  border-radius: 8px;
  transition: background .15s;
}
.pricing-faq summary::-webkit-details-marker { display: none; }
.pricing-faq summary:hover { background: rgba(255, 255, 255, .03); }
.pricing-faq summary::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--muted);
  transition: transform .2s;
}
.pricing-faq details[open] summary::after {
  content: '–';
}
.pricing-faq details[open] summary {
  border: 1px solid var(--accent);
  background: rgba(59, 130, 246, .04);
}
.pricing-faq details p {
  margin: .8rem 1.1rem 0;
  font-size: .92rem;
  color: var(--muted);
  line-height: 1.65;
}
.pricing-faq details p + p { margin-top: .5rem; }
.pricing-faq code {
  background: rgba(255, 255, 255, .06);
  color: var(--fg);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: .82rem;
  font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace);
}
.pricing-faq a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(59, 130, 246, .4);
  text-underline-offset: 3px;
}
.pricing-faq a:hover { text-decoration-color: var(--accent); }

/* ── Upgrade arithmetic under the first paid card ─────────────────────── */
.pricing-card-nudge {
  margin: .75rem 0 0;
  font-size: .78rem;
  line-height: 1.5;
  color: var(--muted);
}
.pricing-card-nudge strong {
  color: var(--fg);
  font-weight: 600;
}

/* Two asides under the grid: operator first, then enterprise. */
.pricing-enterprise + .pricing-enterprise {
  margin-top: .75rem;
}
