/* Pricing page (pricing.html). Plan cards, credit packs, and the rate table.
   Reuses styles.css tokens and compare.css for .compare-scroll/.compare-group
   and the notes. */

.pricing-h2 {
  font-size: var(--text-h2);
  margin: var(--space-xl) 0 var(--space-md);
  letter-spacing: -0.01em;
  text-wrap: balance;
}

/* ---- Plan cards ---- */
.plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-lg);
  align-items: stretch;
}
.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-lg) var(--space-md) var(--space-md);
}
.plan-featured {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 6%, var(--surface));
  box-shadow: 0 12px 40px -18px color-mix(in srgb, var(--primary) 45%, transparent);
}
.plan-flag {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: var(--on-primary);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 12px;
  border-radius: 999px;
  white-space: nowrap;
}
.plan h3 {
  margin: 0 0 var(--space-sm);
  font-size: var(--text-base);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.plan-price {
  margin: 0 0 var(--space-xs);
  font-size: var(--text-stat);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-light) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.plan-price-note {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-muted);
  -webkit-text-fill-color: var(--text-muted);
}
.plan-credits {
  margin: 0 0 var(--space-md);
  font-size: var(--text-sm);
  color: var(--text-muted);
}
.plan-credits strong {
  color: var(--text);
}
.plan-blurb {
  margin: 0 0 var(--space-md);
  color: var(--text-muted);
  font-size: var(--text-sm);
  line-height: 1.55;
}
.plan-limits {
  list-style: none;
  margin: 0 0 var(--space-md);
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xs) var(--space-md);
  font-size: var(--text-sm);
  color: var(--text-muted);
}
.plan-limits li::before {
  content: "✓ ";
  color: var(--live);
}
.plan .cta-group {
  margin-top: auto;
  justify-content: flex-start;
}
.plan .cta {
  margin-top: 0;
}

/* ---- Credit packs ---- */
.packs-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-md);
}
.pack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-md);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.pack:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
}
.pack-credits {
  font-size: var(--text-xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.pack-label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-faint);
}
.pack-price {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--primary);
}

/* ---- Rate table ---- */
.costs-table {
  width: 100%;
  min-width: 560px;
  table-layout: auto;
  overflow-wrap: normal;
  border-collapse: separate;
  border-spacing: 0;
  margin: 0;
  font-size: var(--text-sm);
}
.costs-table th,
.costs-table td {
  padding: var(--space-sm) var(--space-md);
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  text-align: left;
  vertical-align: middle;
}
.costs-table tbody tr {
  background: transparent;
}
.costs-table tbody tr:last-child th,
.costs-table tbody tr:last-child td {
  border-bottom: 0;
}
.costs-table thead th {
  font-weight: 700;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-strong);
}
.costs-table th[scope="row"] {
  font-weight: 500;
  color: var(--text);
}
.costs-table .compare-group th {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 5%, var(--surface));
  padding-top: var(--space-md);
}
/* Expandable option rows (GPU classes, image/LLM providers) */
.cost-parent {
  cursor: pointer;
}
.cost-parent:hover th,
.cost-parent:hover td {
  background: color-mix(in srgb, var(--primary) 4%, transparent);
}
.cost-expand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  box-shadow: none;
  text-align: left;
}
.cost-expand:hover,
.cost-expand:focus,
.cost-expand:active {
  background: transparent;
  box-shadow: none;
}
.cost-expand .chev {
  color: var(--primary);
  font-size: var(--text-xs);
  transition: transform 0.15s ease;
}
.cost-parent.open .chev {
  transform: rotate(90deg);
}
.cost-count {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-faint);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 1px 8px;
  white-space: nowrap;
}
.cost-parent:hover .cost-count {
  color: var(--primary);
  border-color: color-mix(in srgb, var(--primary) 50%, transparent);
}
.cost-sub th,
.cost-sub td {
  background: color-mix(in srgb, var(--bg) 45%, transparent);
}
.cost-sub th[scope="row"] {
  padding-left: calc(var(--space-md) + 1.4rem);
  font-weight: 400;
  color: var(--text-muted);
}
.cost-sub .cost-credits {
  font-weight: 500;
}
.cost-desc td {
  padding-left: calc(var(--space-md) + 1.4rem);
  font-size: var(--text-xs);
  color: var(--text-faint);
  line-height: 1.5;
}

.cost-credits {
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.cost-unit {
  color: var(--text-muted);
}
.cost-usd {
  color: var(--text-faint);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* ---- Responsive ---- */
@media (max-width: 760px) {
  .plans {
    grid-template-columns: 1fr;
  }
  .packs-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-md);
  }
}
@media (max-width: 480px) {
  .packs-row {
    grid-template-columns: 1fr;
  }
  .plan-limits {
    grid-template-columns: 1fr;
  }
}
