/* Pricing page (pages/pricing.html, assets/js/pages/pricing.js) — QuickBooks-style layout:
   title + audience tabs, step tracker, billing switch, plan cards, "Compare all features",
   "All plans include", stats + tiles, FAQ and a closing band. */

.pp { --pp-navy: #0b1a36; --pp-green: #2fd06e; --pp-blue: var(--brand-500); --pp-line: var(--border-subtle); background: var(--bg-surface); }
.pp-h2 { text-align: center; font-size: clamp(2.2rem, 4.4vw, 4rem); font-weight: 500; letter-spacing: -.02em; line-height: 1.1; margin: 0 0 clamp(2rem, 4vw, 3.25rem); color: var(--text-primary); }
.pp-section { padding-block: clamp(3.5rem, 7vw, 6rem); }

/* ---------------- title, tabs, steps, billing ---------------- */
.pp-top { padding-top: calc(72px + clamp(2.5rem, 5vw, 4rem)); }
.pp-title { font-size: clamp(2.4rem, 5vw, 4.25rem); font-weight: 500; letter-spacing: -.025em; line-height: 1.05; margin: 0 0 clamp(1.75rem, 3.5vw, 2.75rem); color: var(--text-primary); }
.pp-tabs { display: inline-flex; align-items: flex-end; gap: 20px; }
.pp-tab { min-width: 260px; height: 54px; padding: 0 28px; border: 1px solid var(--border-default); border-bottom: 0; border-radius: 32px 32px 0 0; background: var(--bg-surface); color: var(--text-primary); font: inherit; font-size: 1.2rem; font-weight: 500; cursor: pointer; }
.pp-tab.is-active { height: 62px; background: var(--pp-navy); border-color: var(--pp-navy); color: #fff; font-weight: 700; }
.pp-tabs-line { border-bottom: 2px solid var(--border-default); }

.pp-steps { display: flex; align-items: center; justify-content: center; gap: 20px; list-style: none; margin: 40px 0 0; padding: 0; color: var(--text-secondary); font-size: 1rem; }
.pp-steps li { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.pp-steps li span { width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--bg-surface-2); color: var(--text-primary); font-weight: 700; font-size: .92rem; }
.pp-steps li.is-current { color: var(--text-primary); font-weight: 600; }
.pp-steps li.is-current span { background: var(--pp-navy); color: #fff; }
.pp-steps .pp-steps-line { width: 56px; height: 1px; background: var(--border-default); }

.pp-billing { display: flex; align-items: center; justify-content: center; gap: 22px; margin: 40px 0 0; flex-wrap: wrap; }
.pp-billing-label { border: 0; background: none; padding: 0; font: inherit; font-size: 1.05rem; color: var(--text-secondary); cursor: pointer; }
.pp-billing-label.is-active { color: var(--text-primary); font-weight: 600; }
.pp-billing-label strong { color: #1a9d4c; font-weight: 800; }
.pp-switch { position: relative; width: 54px; height: 30px; margin: 0; cursor: pointer; flex-shrink: 0; }
.pp-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.pp-switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--pp-green); transition: background var(--dur-fast); }
.pp-switch span::before { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform var(--dur-fast) var(--ease-out); }
.pp-switch input:checked + span::before { transform: translateX(24px); }
.pp-switch input:focus-visible + span { outline: 3px solid var(--pp-blue); outline-offset: 3px; }

/* ---------------- plan cards ---------------- */
.pp-cards-section { padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(3rem, 6vw, 5rem); }
/* Each card spans 5 rows of the shared grid (subgrid), so its sections line up across cards
   even when one plan's tagline wraps to two lines. */
.pp-cards { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); column-gap: 16px; row-gap: 0; align-items: stretch; max-width: calc(var(--cols, 4) * 340px); margin: 0 auto; }
.pp-loading { grid-column: 1 / -1; text-align: center; color: var(--text-tertiary); padding: 3rem 0; }

.ppc { display: grid; grid-template-rows: subgrid; grid-row: span 5; margin-bottom: 16px; border: 1px solid var(--border-default); border-radius: 14px; overflow: hidden; background: var(--bg-surface); }
.ppc.is-featured { border: 2px solid var(--pp-navy); }
[data-theme="dark"] .ppc.is-featured { border-color: #6b5bd6; }
.ppc-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 46px; padding: 0 18px; background: var(--bg-surface-2); font-size: .78rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; color: var(--text-primary); border-bottom: 1px solid var(--border-subtle); }
.ppc.is-featured .ppc-head { background: var(--pp-navy); color: #fff; border-bottom-color: var(--pp-navy); }
.ppc-head em { font-style: normal; padding: 3px 8px; border-radius: 999px; background: var(--pp-green); color: var(--pp-navy); font-size: .7rem; letter-spacing: .02em; }
.ppc-tagline { display: flex; align-items: center; gap: 8px; min-height: 64px; padding: 14px 18px; border-left: 4px solid var(--accent); border-bottom: 1px solid var(--border-subtle); font-size: .95rem; font-weight: 700; color: var(--text-primary); }
.ppc-tagline i { color: var(--text-primary); }
.ppc-body { padding: 24px 18px 22px; border-bottom: 1px solid var(--border-subtle); }
.ppc-price[hidden] { display: none; }
.ppc-price { display: flex; flex-direction: column; min-height: 72px; }
.ppc-strike { font-size: .8rem; color: var(--text-secondary); }
.ppc-strike-empty { visibility: hidden; }
.ppc-amount { font-size: 1.45rem; font-weight: 600; color: var(--text-primary); line-height: 1.25; }
.ppc-amount small { font-size: .8rem; font-weight: 400; color: var(--text-secondary); }
.ppc-note { font-size: .78rem; color: var(--text-secondary); margin-top: 4px; }

.ppc-btn { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 52px; margin-top: 20px; border-radius: 999px; border: 2px solid var(--brand-500); background: var(--brand-500); color: #fff; font-weight: 700; font-size: 1rem; transition: background var(--dur-fast), border-color var(--dur-fast), color var(--dur-fast); }
.ppc-btn:hover { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.ppc-btn.is-outline { background: transparent; border-color: var(--text-primary); color: var(--text-primary); }
.ppc-btn.is-outline:hover { background: var(--text-primary); color: var(--bg-surface); }
.ppc-btn-sm { min-height: 46px; margin-top: 14px; font-size: .92rem; }

.ppc-limits { display: flex; flex-direction: column; margin-top: 22px; }
.ppc-limits strong { font-size: .92rem; font-weight: 700; color: var(--text-primary); }
.ppc-limits span { font-size: .78rem; color: var(--text-secondary); margin-top: 2px; }
.ppc-everything { padding: 22px 18px; font-size: .92rem; font-weight: 700; color: var(--text-primary); border-bottom: 3px solid var(--pp-blue); }
.ppc-features { display: flex; flex-direction: column; padding: 20px 18px 26px; }
.ppc-features ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.ppc-features li { display: flex; gap: 10px; font-size: .92rem; color: var(--text-primary); line-height: 1.35; }
.ppc-features li i { color: #1a9d4c; font-size: 1.05rem; line-height: 1.2; }
.ppc-seeall { margin-top: 22px; font-size: .92rem; font-weight: 600; color: var(--pp-blue); text-decoration: underline; text-underline-offset: 3px; }
[data-theme="dark"] .ppc-seeall { color: #7aa7ff; }

/* ---------------- compare all features ---------------- */
.pp-compare-section { padding: clamp(3rem, 6vw, 5rem) 0 0; }
.pp-compare { max-width: 1200px; margin: 0 auto; }
.ppt-scroll { overflow-x: auto; }
.ppt-inner { min-width: calc(260px + var(--cols, 4) * 150px); }
.ppt-head, .ppt-row { display: grid; grid-template-columns: minmax(220px, 1.6fr) repeat(var(--cols, 4), minmax(130px, 1fr)); }
.ppt-head { gap: 16px; align-items: end; margin-bottom: 20px; }
.ppt-plan { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 22px 14px 18px; border: 1px solid var(--border-default); border-radius: 14px; text-align: center; background: var(--bg-surface); }
.ppt-plan.is-featured { border: 2px solid var(--pp-navy); border-top-width: 26px; padding-top: 16px; }
[data-theme="dark"] .ppt-plan.is-featured { border-color: #6b5bd6; }
.ppt-pick { position: absolute; top: -21px; left: 0; right: 0; font-size: .72rem; font-weight: 700; color: var(--pp-green); }
.ppt-plan strong { font-size: 1.02rem; font-weight: 600; color: var(--text-primary); }
.ppt-price { font-size: 1rem; font-weight: 700; color: var(--text-primary); }
.ppt-price[hidden] { display: none; }
.ppt-price s { font-weight: 400; color: var(--text-secondary); margin-right: 4px; }
.ppt-price small { font-size: inherit; font-weight: inherit; }

.ppt-group { margin-top: 10px; }
.ppt-group-head { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 62px; padding: 0 22px 0 16px; border: 1px solid var(--border-default); border-radius: 999px; background: var(--bg-surface-2); color: var(--text-primary); font: inherit; font-size: 1rem; font-weight: 700; text-align: left; cursor: pointer; }
.ppt-group.is-first .ppt-group-head { background: #dbe8fb; border-color: #9fc1f5; color: #0b1a36; }
[data-theme="dark"] .ppt-group.is-first .ppt-group-head { background: #16264a; border-color: #2c4b8a; color: #e8eefc; }
.ppt-group-icon { width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--pp-navy); color: #fff; font-size: .95rem; flex-shrink: 0; }
.ppt-group.is-first .ppt-group-icon { background: var(--pp-blue); }
.ppt-chev { margin-left: auto; font-size: .9rem; transition: transform var(--dur-fast); }
.ppt-group.is-collapsed .ppt-chev { transform: rotate(180deg); }
.ppt-rows { margin-top: 8px; border: 1px solid var(--border-default); border-radius: 16px; padding: 0 20px; background: var(--bg-surface); }
.ppt-group.is-collapsed .ppt-rows { display: none; }
.ppt-row { align-items: center; min-height: 66px; border-bottom: 1px solid var(--border-subtle); }
.ppt-row:last-child { border-bottom: 0; }
.ppt-label { font-size: .92rem; color: var(--text-primary); padding: 14px 12px 14px 0; }
.ppt-badge { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: #c9f3f5; color: #0d3b45; font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; vertical-align: 2px; }
.ppt-cell { text-align: center; }
.ppt-yes { color: #1a9d4c; font-size: 1.35rem; }
.ppt-no { display: inline-block; width: 16px; height: 3px; border-radius: 2px; background: #b9bec7; vertical-align: middle; }
.ppt-text { font-size: .9rem; font-weight: 500; color: var(--text-primary); }
.pp-fineprint { text-align: center; margin: 36px 0 0; }
.pp-fineprint a { font-size: .95rem; font-weight: 700; color: var(--text-primary); text-decoration: underline; text-underline-offset: 3px; }

/* ---------------- all plans include ---------------- */
.pp-include { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.pp-include-card { padding: clamp(2rem, 4vw, 3.75rem); padding-bottom: clamp(2.5rem, 5vw, 5rem); border-radius: 16px; background: #e3e8ec; color: #11152a; }
[data-theme="dark"] .pp-include-card { background: #1b1f27; color: var(--text-primary); }
.pp-include-card > i { font-size: 1.9rem; }
.pp-include-card h3 { font-size: clamp(1.5rem, 2.3vw, 2rem); font-weight: 400; margin: 28px 0 18px; color: inherit; }
.pp-include-card p { font-size: 1.08rem; line-height: 1.65; margin: 0; color: inherit; opacity: .92; }

/* ---------------- stats + tiles ---------------- */
.pp-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 1130px; margin: 0 auto; padding: 30px 0; border: 1px solid var(--border-default); border-radius: 18px; background: var(--bg-surface); }
.pp-stats > div { display: flex; flex-direction: column; gap: 6px; padding: 0 40px; }
.pp-stats > div + div { border-left: 1px solid var(--border-default); }
.pp-stats strong { font-size: 1.4rem; font-weight: 500; color: var(--text-primary); display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pp-stats span { font-size: .92rem; color: var(--text-secondary); }
.pp-stars { display: inline-flex; gap: 2px; color: #f79009; font-size: 1rem; }

.pp-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; max-width: 1200px; margin: clamp(4rem, 8vw, 8.5rem) auto 0; }
.pp-tile { display: flex; flex-direction: column; align-items: flex-start; min-height: 416px; padding: clamp(2.25rem, 4vw, 3.75rem); border-radius: 16px; }
.pp-tile > i { font-size: 1.7rem; }
.pp-tile h3 { font-size: clamp(2rem, 3.4vw, 2.9rem); font-weight: 500; line-height: 1.15; margin: 44px 0 auto; max-width: 440px; color: inherit; }
.pp-tile-btn { display: inline-flex; align-items: center; min-height: 46px; padding: 0 28px; margin-top: 40px; border: 2px solid currentColor; border-radius: 999px; font-weight: 700; font-size: .95rem; color: inherit; transition: background var(--dur-fast), color var(--dur-fast); }
.pp-tile-dark { background: #020b30; color: #fff; }
.pp-tile-dark > i { color: var(--pp-green); }
.pp-tile-dark .pp-tile-btn:hover { background: #fff; color: #020b30; }
.pp-tile-light { background: #ccfdfd; color: #0b1a36; }
.pp-tile-light .pp-tile-btn:hover { background: #0b1a36; color: #ccfdfd; }

/* ---------------- FAQ ---------------- */
.pp-faq { max-width: 780px; margin: 0 auto; }
.pp-faq.accordion-modern .acc-item { border: 0; border-top: 1px solid var(--border-default); border-radius: 0; background: transparent; margin: 0; }
.pp-faq.accordion-modern .acc-item:last-child { border-bottom: 1px solid var(--border-default); }
.pp-faq.accordion-modern .acc-header { padding: 22px 0; font-size: 1rem; font-weight: 500; }
.pp-faq.accordion-modern .acc-body p { padding: 0 0 22px; margin: 0; color: var(--text-secondary); }

/* ---------------- closing band ---------------- */
.pp-band { padding: clamp(4rem, 8vw, 6.5rem) 0 clamp(2rem, 4vw, 2.75rem); background: var(--brand-500); color: #fff; }
.pp-band h2 { font-size: clamp(2rem, 4vw, 3.1rem); font-weight: 400; letter-spacing: -.02em; line-height: 1.15; max-width: 900px; margin: 0 auto; color: #fff; }
.pp-band-btn { display: inline-flex; align-items: center; min-height: 52px; padding: 0 30px; margin-top: 44px; border-radius: 999px; background: var(--pp-navy); color: #fff; font-weight: 700; }
.pp-band-btn:hover { background: #000; color: #fff; }
.pp-band-fine { margin: clamp(4rem, 9vw, 8rem) 0 0; }
.pp-band-fine a { color: #fff; font-size: .95rem; text-decoration: underline; text-underline-offset: 3px; }

/* ---------------- smaller screens ---------------- */
@media (max-width: 1199px) {
  .pp-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 720px; }
}
@media (max-width: 991px) {
  .pp-include { grid-template-columns: 1fr; }
  .pp-stats { grid-template-columns: 1fr; padding: 8px 0; }
  .pp-stats > div { padding: 18px 28px; }
  .pp-stats > div + div { border-left: 0; border-top: 1px solid var(--border-default); }
  .pp-tiles { grid-template-columns: 1fr; }
  .pp-tile { min-height: 320px; }
}
@media (max-width: 640px) {
  .pp-tabs { gap: 8px; width: 100%; }
  .pp-tab { flex: 1; min-width: 0; padding: 0 10px; font-size: .9rem; height: 48px; }
  .pp-tab.is-active { height: 54px; }
  .pp-steps { gap: 8px; font-size: .85rem; }
  .pp-steps li span { width: 28px; height: 28px; font-size: .8rem; }
  .pp-steps .pp-steps-line { display: none; }
  .pp-steps { gap: 14px; }
  .pp-tab { white-space: nowrap; }
  .pp-cards { grid-template-columns: 1fr; }
  .pp-billing { gap: 12px; }
  .pp-billing-label { font-size: .95rem; }
}
@media (max-width: 400px) {
  .pp-steps { gap: 10px; font-size: .78rem; }
  .pp-steps li { gap: 6px; }
  .pp-steps li span { width: 24px; height: 24px; font-size: .72rem; }
}

/* Compare table: the plan cards stick under the fixed header (and the offer ribbon, if showing)
   while you scroll through the feature rows. Needs the table not to be a sideways-scroll box, so
   it's on from 992px; narrower screens keep sideways scrolling instead. */
@media (min-width: 992px) {
  .ppt-scroll { overflow: visible; }
  .ppt-head {
    position: sticky; top: calc(var(--ribbon-h, 0px) + 71px); z-index: 5; /* 71px = header height once scrolled */
    margin-inline: -8px; padding: 22px 8px 14px; background: var(--bg-surface);
  }
  /* covers the strip above the cards, so rows never peek out between them and the header */
  .ppt-head::before { content: ''; position: absolute; left: 0; right: 0; bottom: 100%; height: 40px; background: var(--bg-surface); }
}

.pp-per-device { text-align: center; margin: 22px 0 0; font-size: .98rem; font-weight: 600; color: var(--text-secondary); }

/* Compare table on phones and tablets: no sideways scrolling. The four plans become four equal
   columns; each feature's name takes its own full-width line with the ticks underneath, lined up
   under small plan headers that stay pinned while you scroll (like the reference design). */
@media (max-width: 991.98px) {
  .ppt-scroll { overflow: visible; }
  .ppt-inner { min-width: 0; }
  .ppt-head, .ppt-row { grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); }
  .ppt-head {
    gap: 6px; margin-bottom: 14px;
    position: sticky; top: calc(var(--ribbon-h, 0px) + var(--pp-header-h, 64px)); z-index: 5;
    margin-inline: -6px; padding: 12px 6px 8px; background: var(--bg-surface);
  }
  .ppt-head > :first-child { display: none; }           /* the empty corner above the labels */
  .ppt-plan { gap: 2px; padding: 10px 4px; border-radius: 12px; min-width: 0; }
  .ppt-plan.is-featured { border-top-width: 22px; padding-top: 8px; }
  .ppt-pick { top: -18px; font-size: .62rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 4px; }
  .ppt-plan strong { font-size: .8rem; line-height: 1.2; overflow-wrap: anywhere; }
  .ppt-price { font-size: .8rem; line-height: 1.25; overflow-wrap: anywhere; }
  .ppt-price small { display: block; font-size: .64rem; font-weight: 500; color: var(--text-secondary); }
  .ppt-plan .ppc-btn { display: none; }                 /* the cards above already have the buttons */
  .ppt-group-head { min-height: 52px; font-size: .95rem; padding: 0 16px 0 10px; }
  .ppt-rows { padding: 0 10px; border-radius: 14px; }
  .ppt-row { min-height: 0; padding-bottom: 10px; row-gap: 0; }
  .ppt-label { grid-column: 1 / -1; padding: 12px 2px 8px; font-size: .88rem; }
  .ppt-cell { padding: 4px 2px; min-width: 0; border-left: 1px solid var(--border-subtle); }
  .ppt-cell:nth-child(2) { border-left: 0; }            /* first value column (after the label) */
  .ppt-yes { font-size: 1.2rem; }
  .ppt-text { display: block; font-size: .72rem; line-height: 1.25; overflow-wrap: anywhere; }
}

/* Hardware & setup (pricing.js renderAddOns) */
.pp-addons-section { padding: 0 0 clamp(1rem, 3vw, 2rem); }
.pp-addons-section[hidden] { display: none; }
.pp-addons-head { text-align: center; max-width: 720px; margin: 0 auto 24px; }
.pp-h3 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 500; letter-spacing: -.01em; margin: 0 0 10px; color: var(--text-primary); }
.pp-addons-head p { color: var(--text-secondary); margin: 0; }
.pp-addons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.pp-addon { display: flex; align-items: flex-start; gap: 14px; padding: 18px 20px; border: 1px solid var(--border-default); border-radius: 16px; background: var(--bg-surface); }
.pp-addon-icon { width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--pp-navy); color: #fff; font-size: 1.25rem; }
.pp-addon-body { flex: 1; min-width: 0; }
.pp-addon-name { font-weight: 700; color: var(--text-primary); }
.pp-addon-tag { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--bg-surface-2); color: var(--text-secondary); font-size: .68rem; font-weight: 700; vertical-align: 2px; }
.pp-addon-body p { margin: 4px 0 0; font-size: .88rem; color: var(--text-secondary); line-height: 1.45; }
.pp-addon-price { text-align: right; white-space: nowrap; }
.pp-addon-price strong { display: block; font-size: 1.15rem; color: var(--text-primary); }
.pp-addon-price small { color: var(--text-secondary); font-size: .78rem; }
.pp-addon-price .is-quote { font-size: .82rem; font-weight: 600; color: var(--text-secondary); }
.pp-addons-note { text-align: center; margin: 18px 0 0; font-size: .92rem; color: var(--text-secondary); }
@media (max-width: 767.98px) {
  .pp-addons { grid-template-columns: 1fr; }
  .pp-addon { flex-wrap: wrap; padding: 16px; }
  .pp-addon-price { width: 100%; text-align: left; padding-left: 58px; }
  .pp-addon-price strong, .pp-addon-price small { display: inline; margin-right: 4px; }
}
