/* Plan cards — ONE component for /pricing, the homepage #pricing and dashboard #upgrade (2026-10-18 v3).
   Look = the dashboard #upgrade cards (left-aligned, small uppercase label, plan name, big price,
   ticked rows with thin separators, full-width button). Rows are aligned across the 3 cards with
   CSS subgrid: label · name · who · price · lifetime line · 5 benefits · offer · CTA · credits line.
   Browsers without subgrid fall back to a flex column (same content, rows not pixel-aligned). */

.pcards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(13, auto);
  gap: 0 20px;
  max-width: 1180px;
  margin: 0 auto;
  align-items: start;
  align-content: start;
}
.pcards .pcard {
  grid-row: span 13;
  display: flex;
  flex-direction: column;
  position: relative;
  text-align: left;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 20px 22px 18px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transform: none;
  transition: box-shadow .2s ease;
  min-width: 0;
}
@supports (grid-template-rows: subgrid) {
  .pcards .pcard { display: grid; grid-template-rows: subgrid; row-gap: 0; }
  .pcards .pcard-list { display: contents; }
}
.pcards .pcard:hover { box-shadow: 0 10px 28px -14px rgba(15, 23, 42, 0.22); }
.pcards .pcard.featured { border: 2px solid #0a66c2; padding: 19px 21px 17px; box-shadow: 0 14px 34px -18px rgba(10, 102, 194, 0.45); transform: none; }
.pcards .pcard.current { background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%); }

/* label row */
.pcards .pcard-label, .pcards .plan-badge-label {
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: #64748b; margin: 0 0 4px; min-height: 16px; line-height: 16px;
}
.pcards .pcard-label--rec, .pcards .plan-badge-label.recommended { color: #0a66c2; }
.pcards .plan-badge-label.current-plan { color: #0f172a; }
/* the homepage absolute "Recommended" pill is not used here */
.pcards .pricing-badge { display: none; }

.pcards .pcard-name { font-size: 21px; font-weight: 800; color: #0f172a; margin: 0 0 4px; line-height: 1.25; text-align: left; }
.pcards .pcard-who { font-size: 13.5px; color: #64748b; line-height: 1.45; margin: 0 0 10px; }
.pcards .pcard-price { display: flex; align-items: baseline; justify-content: flex-start; flex-wrap: wrap; gap: 2px 4px; margin: 0; }
.pcards .pcard-price .price, .pcards .pcard-price .plan-price-value { font-size: 38px; line-height: 1.1; font-weight: 800; color: #0f172a; letter-spacing: -0.01em; }
.pcards .pcard-price .period, .pcards .pcard-price .plan-price-period { font-size: 14px; color: #64748b; white-space: nowrap; }

/* lifetime row: "or $49.90 once — lifetime access" (Monthly) / "Pay once — …" (Lifetime) / "No card" (Free) */
.pcards .pcard-life { min-height: 22px; margin: 2px 0 12px; font-size: 13px; line-height: 1.45; }
.pcards .pcard-life p { margin: 0; text-align: left; font-size: 13px; }
.pcards .pcard-note { color: #64748b; }
.pcards .pricing-lifetime-link, .pcards .plan-lifetime-link {
  background: none; border: 0; padding: 0; font: inherit; color: #0a66c2; cursor: pointer;
  text-decoration: underline; text-underline-offset: 2px; text-align: left;
}
.pcards .pricing-lifetime-hint-price, .pcards .plan-lifetime-hint-price { font-weight: 700; }
.pcards .pricing-billed { color: #0a66c2; font-weight: 600; margin: 0; }

/* benefit rows */
.pcards .pcard-list { list-style: none; margin: 0 0 14px; padding: 0; }
.pcards .pcard-list li {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 7px 0; margin: 0;
  border-top: 1px solid #eef2f7;
  font-size: 13.5px; line-height: 1.4; color: #0f172a; font-weight: 500;
  background: none; border-radius: 0;
}
.pcards .pcard-list li::before { content: none; display: none; }
.pcards .pcard-list li:last-child { border-bottom: 1px solid #eef2f7; margin-bottom: 14px; }
.pcards .pcard-ico { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; fill: #0a66c2; color: #cbd5e1; }
.pcards .pcard-no { color: #94a3b8; }
.pcards .pcard-no .pcard-no-txt { color: #94a3b8; }
.pcards .featured .pcard-yes { font-weight: 600; }

.pcards .pcard-offer:empty { display: block; min-height: 0; }
.pcards .pcard-offer .aamx-offer { margin: 0 0 10px; padding: 6px 10px; font-size: 12px; line-height: 1.35; }

.pcards .btn-block, .pcards .pcard > .btn {
  width: 100%; min-height: 44px; margin: 0; display: flex; align-items: center; justify-content: center;
  align-self: end; box-sizing: border-box;
}
.pcards .pcard-cta-slot { min-height: 0; }
.pcards .plan-credits-info { margin-top: 10px; }

.pcards-all { max-width: 1180px; margin: 14px auto 0; text-align: center; font-size: 13px; color: #64748b; line-height: 1.5; }
.pcards-stripe { margin-top: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Dashboard: sidebar narrows the content — tighter text so rows stay short */
#section-upgrade .pcards { gap: 0 16px; max-width: none; }
#section-upgrade .pcards .pcard-price .plan-price-value { font-size: 32px; }

@media (max-width: 900px) {
  .pcards { grid-template-columns: 1fr; grid-template-rows: none; gap: 16px; max-width: 520px; }
  .pcards .pcard { grid-row: auto; display: flex; }
  .pcards .pcard-list { display: block; }
  .pcards .pcard.featured { order: -1; }
  .pcards .pcard-label[aria-hidden="true"] { display: none; }
  #section-upgrade .pcards .pcard.upgrade-mobile-first { order: -1; }
}
@media (max-width: 480px) {
  .pcards .pcard { padding: 18px 18px 16px; }
  .pcards .pcard.featured { padding: 17px 17px 15px; }
  .pcards .pcard-price .price, .pcards .pcard-price .plan-price-value { font-size: 34px; }
  .pcards .pcard-list li { padding: 6px 0; }
  .pcards .pcard-who { margin-bottom: 8px; }
}

/* dashboard: paid users see their current plan first on phones (dashboard.js#renderCurrentPlanBadge) */
@media (max-width: 900px) {
  #section-upgrade .pcards .pcard.featured { order: 0; }
  #section-upgrade .pcards .pcard.upgrade-mobile-first { order: -1; }
  #section-upgrade .pcards .pcard.upgrade-mobile-last { order: 1; }
}
/* dashboard desktop: plan CTAs inside the first screen at 1366x768 (FR included) */
@media (min-width: 901px) {
  #section-upgrade .pcards .pcard { padding-top: 16px; padding-bottom: 14px; }
  #section-upgrade .pcards .pcard.featured { padding-top: 15px; padding-bottom: 13px; }
  #section-upgrade .pcards .pcard-who { margin-bottom: 6px; font-size: 13px; }
  #section-upgrade .pcards .pcard-life { margin-bottom: 8px; }
  #section-upgrade .pcards .pcard-list li { padding: 5px 0; font-size: 13px; line-height: 1.35; }
  #section-upgrade .pcards .pcard-list li:last-child { margin-bottom: 10px; }
  #section-upgrade .pcards .pcard-offer .aamx-offer { margin-bottom: 8px; padding: 4px 8px; font-size: 11.5px; line-height: 1.3; }
}
