/* ==========================================================================
   Pricing (/buy/) and Upgrades & Renewals (/upgrades/), refreshed layout.
   Approved design: P5 option A (license cards, 3 + 2) and P6 (compact cards, five in a row).
   Markup: Pages/Buy/Index.cshtml, Pages/Upgrades/Index.cshtml, _LicenseCards, _CurrencySwitch, and the Pricing
   sub-pages (Ordering FAQ, Purchase Orders, Resellers, Software Maintenance).
   Uses the site.css tokens and components. The pages render full width (ViewData["WideLayout"]).
   ========================================================================== */

.pricing-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; margin-bottom: 22px; }
.pricing-bar > div:first-child { flex: 1 1 420px; }
.pricing-bar h2 { font-size: 22px; }
.pricing-bar p { margin-top: 4px; color: var(--hw-muted); font-size: 15px; }

/* Currency switch: three ?cur= links; the current one has aria-current. */
.currency { display: inline-flex; align-items: center; gap: 10px; color: var(--hw-muted); font-size: 14px; font-weight: 600; }
.currency ul { display: inline-flex; padding: 3px; border-radius: 9px; background: var(--hw-soft-2); }
.currency a, .currency a:visited {
  display: block; min-width: 54px; padding: 6px 12px; border-radius: 7px;
  color: var(--hw-body); font-size: 14px; font-weight: 700; line-height: 1.4; text-align: center;
}
.currency a:hover { color: var(--hw-ink); text-decoration: none; }
.currency a[aria-current] { background: #fff; color: var(--hw-ink); box-shadow: 0 1px 2px rgba(29, 35, 48, .12), 0 2px 6px rgba(29, 35, 48, .06); }

.tier-group + .tier-group { margin-top: 28px; }
.pricing .tier-group__title { margin-bottom: 12px; color: var(--hw-muted); font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }

/* License cards */
.tiers { display: grid; gap: 20px; }
.tiers--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tiers--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tiers--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.tier { display: flex; flex-direction: column; height: 100%; padding: 24px 24px 20px; border-top: 4px solid var(--acc); }
.tier__head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.pricing .tier__name { color: var(--hw-ink); font-size: 18px; line-height: 1.3; font-weight: 700; }
.pricing .tier__who { min-height: 45px; margin-bottom: 16px; font-size: 14.5px; line-height: 1.55; }
.pricing .tier__price {
  display: flex; align-items: flex-start; gap: 2px; color: var(--hw-ink);
  font-size: 40px; line-height: 1; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums;
}
.tier__cur { margin-top: 5px; margin-right: 2px; color: var(--hw-body); font-size: 20px; font-weight: 700; }
.pricing .tier__term { margin: 8px 0 18px; color: var(--hw-muted); font-size: 13.5px; line-height: 1.5; }
.tier .btn { margin-top: auto; }
.pricing .tier__meta { display: flex; justify-content: space-between; gap: 10px; margin-top: 12px; color: var(--hw-muted); font-size: 13px; line-height: 1.5; }
.tier__meta a { font-weight: 600; }
.tier--compact { padding: 18px 18px 16px; }
.pricing .tier--compact .tier__name { min-height: 42px; font-size: 15.5px; }
.pricing .tier--compact .tier__price { margin: 10px 0 14px; font-size: 30px; }
.tier--compact .tier__cur { margin-top: 3px; font-size: 16px; }
.pricing .tier--compact .tier__meta { flex-direction: column; gap: 2px; }

/* What every license includes */
.includes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-top: 28px; padding: 22px 24px; border-radius: var(--hw-radius-lg); background: var(--hw-soft); }
.includes li { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; align-items: start; color: var(--hw-body); font-size: 14px; line-height: 1.5; }
.includes .icon-tile { width: 36px; height: 36px; border-radius: 10px; background: #fff; }
.includes .icon-tile svg { width: 19px; height: 19px; }
.includes strong { display: block; color: var(--hw-ink); font-size: 14.5px; }

/* Try before you buy */
.try-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 28px; padding: 22px 26px;
  border: 1px solid #ffd9c6; border-radius: var(--hw-radius-lg); background: linear-gradient(180deg, #fff8f4 0%, #fff3ec 100%); }
.try-strip > div:first-child { flex: 1 1 420px; }
.try-strip h2 { margin-bottom: 4px; font-size: 19px; }
.pricing .try-strip p { font-size: 15px; }
.try-strip__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; }

.pricing .pricing-contact { margin-top: 18px; }
.pricing .notice { margin-bottom: 0; }
.pricing .mac-interest-prompt { margin-top: 40px; }

/* Pricing sub-pages (prose in the full-width layout, with the Pricing tabs) */
.prose .license-table td:last-child { white-space: nowrap; }

.reseller-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; margin-top: 24px; }
.reseller-group { padding: 18px 20px 20px; border: 1px solid var(--hw-line); border-radius: var(--hw-radius-lg); background: #fff; }
.prose .reseller-group h2 { margin: 0 0 14px; font-size: 16px; }
.reseller-logos { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.reseller-logos a { display: inline-flex; padding: 4px; border-radius: 6px; }
.reseller-logos a:hover { background: var(--hw-soft); }
.reseller-logos img { width: auto; max-width: 170px; max-height: 64px; height: auto; }

@media (max-width: 991px) {
  .tiers--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiers--5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .includes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  /* The license table stacks: one block per license type. */
  .prose .license-table, .prose .license-table tbody, .prose .license-table tr, .prose .license-table td { display: block; }
  .prose .license-table tr:first-child { display: none; }
  .prose .license-table tr { border-bottom: 1px solid var(--hw-line); }
  .prose .license-table tr:last-child { border-bottom: 0; }
  .prose .license-table td { padding: 4px 14px; border: 0; }
  .prose .license-table td:first-child { padding-top: 12px; }
  .prose .license-table td:last-child { padding-bottom: 12px; }
  .tiers--3, .tiers--2 { grid-template-columns: 1fr; }
  .tiers--5 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .pricing .tier__who { min-height: 0; }
  .includes { grid-template-columns: 1fr; }
  .try-strip__actions { width: 100%; }
  .try-strip__actions .btn { width: 100%; }
}
@media (max-width: 420px) {
  .tiers--5 { grid-template-columns: 1fr; }
  .pricing .tier--compact .tier__name { min-height: 0; }
}
