/* The /pricing page (public/content/pricing.html). Only palette tokens: the names that exist both in the
   current tokens (app.css) and in the design system (app-tokens.css); --ai (the AI purple, no longer used here) falls back to
   the main pink until the design system's tokens are in. No colour, font size in px, corner or shadow of
   its own (test/design-lint.test.mjs). */

html[data-page="pricing"] .page-view { background: var(--canvas); padding-inline: var(--s4); padding-bottom: var(--s10); }
.pricing { max-width: 1120px; margin: 0 auto; color: var(--text); }
.pricing svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

.pr-head { text-align: center; padding: 56px 0 24px; }
.pr-head h1 { margin: 0 0 12px; font-size: var(--fs-32, 2rem); font-weight: 600; line-height: 1.25; }
.pr-lead { max-width: 620px; margin: 0 auto 20px; color: var(--text-muted); font-size: var(--fs-md); line-height: 1.6; }
.pr-switch { display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center; }
.pr-save { font-size: var(--fs-xs); font-weight: 600; padding: 3px 10px; border-radius: var(--r-lg); background: var(--primary-soft); color: var(--on-primary-soft); border: 1px solid var(--primary); }
.pr-save[hidden] { display: none; }

/* Three plans (2026-11-20): Free (neutral), Pro (the pink of the main colour, "Most popular") and Business (the logo's blue:
   --plan-biz-* in app-tokens.css; -edge is decoration only, -ink is the readable blue for text, checks and the pill).
   Every card has the same rows (src/pricing.js): a bold value, a label, a check or a red cross. */
.pr-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s5); align-items: stretch; }
.pr-card { position: relative; display: flex; flex-direction: column; min-width: 0; padding: var(--s6) var(--s6) var(--s5); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--card-shadow); }
.pr-card.pro { border: 2px solid var(--primary); padding: calc(var(--s6) - 1px) calc(var(--s6) - 1px) calc(var(--s5) - 1px); }
.pr-card.biz { border-color: var(--plan-biz-edge); border-top-width: var(--s1); background: linear-gradient(to bottom, var(--plan-biz-soft), var(--surface) 11rem); }
.pr-popular { position: absolute; top: 0; inset-inline-start: 50%; transform: translate(-50%, -50%); white-space: nowrap; }
.pr-popular:dir(rtl) { transform: translate(50%, -50%); }
/* The signed-in person's plan: a quiet outline (Pro and Business keep their own). */
.pr-card.current.free { border-color: var(--border-strong); }
.pr-card h2 { margin: 0 0 var(--s1); font-size: var(--fs-24); font-weight: var(--fw-semibold); line-height: var(--lh-tight); }
.pr-card.pro h2 { color: var(--on-primary-soft); }
.pr-card.biz h2 { color: var(--plan-biz-ink); }
.pr-who { margin: 0 0 var(--s4); color: var(--text-muted); font-size: var(--fs-14); line-height: var(--lh-ui); min-height: 2.6em; }
.pr-price { display: flex; align-items: baseline; gap: var(--s2); margin: 0 0 var(--s1); }
.pr-price b { font-size: var(--fs-32); font-weight: var(--fw-semibold); line-height: var(--lh-tight); }
.pr-price span { color: var(--text-muted); font-size: var(--fs-14); }
.pr-note { margin: 0 0 var(--s4); min-height: 1.5em; color: var(--text-muted); font-size: var(--fs-12); }
.pr-btn { display: flex; width: 100%; text-decoration: none; margin-bottom: var(--s5); }
.pr-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.pr-row { position: relative; display: flex; align-items: flex-start; gap: var(--s3); padding: var(--s2) 0; border-top: 1px solid var(--border); font-size: var(--fs-14); line-height: var(--lh-ui); }
.pr-row:first-child { border-top: 0; }
.pr-mark { flex: none; display: inline-grid; place-items: center; width: var(--s5); height: var(--s5); }
.pr-mark svg { width: var(--icon); height: var(--icon); stroke-width: 2.5; }
.pr-row.ok .pr-mark { color: var(--text); }
.pr-card.pro .pr-row.ok .pr-mark { color: var(--on-primary-soft); }
.pr-card.biz .pr-row.ok .pr-mark { color: var(--plan-biz-ink); }
.pr-row.no .pr-mark { color: var(--danger); }
.pr-row.no .pr-text { color: var(--text-muted); }
.pr-text { min-width: 0; overflow-wrap: anywhere; }
.pr-val { font-weight: var(--fw-bold); }
.pr-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.pr-soon { margin: var(--s4) 0 0; padding-top: var(--s3); border-top: 1px solid var(--border); color: var(--text-muted); font-size: var(--fs-12); line-height: var(--lh-ui); }
.pr-card .pr-soon { margin-top: auto; }
.pr-card.biz .pr-group[data-group="all"] { margin-bottom: var(--s4); }
/* AI and All features (2026-11-23, like Jotform): a soft box with a title row that opens and closes it */
.pr-group { margin-top: var(--s3); padding: 0 var(--s3); border-radius: var(--r-md); background: var(--sunken); }
.pr-group > summary { list-style: none; display: flex; align-items: center; gap: var(--s2); min-height: var(--ctl); cursor: pointer;
  font-size: var(--fs-14); font-weight: var(--fw-semibold); border-radius: var(--r-md); }
.pr-group > summary::-webkit-details-marker { display: none; }
.pr-group > summary .ic { width: var(--icon); height: var(--icon); flex: none; }
.pr-group > summary .ic:first-child { color: var(--primary); }
.pr-group > summary .pr-chev { margin-inline-start: auto; color: var(--text-muted); transition: transform var(--dur); }
.pr-group[open] > summary .pr-chev { transform: rotate(180deg); }
.pr-group > summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.pr-group .pr-list { padding-bottom: var(--s2); }

/* Monthly / Yearly and the plan tabs are two DIFFERENT controls (Dorit, 2026-11-23): the billing switch is a small neutral box (soft corners, the
   selected side raised in white with dark text, never pink); the plan tabs are narrow separate pills in a row, the selected one filled in its plan colour. */
.pr-switch .seg { border: 1px solid var(--border); border-radius: var(--r-sm); padding: 3px; background: var(--sunken); }
.pr-switch .seg > button, .pr-switch .interval button { min-height: var(--ctl); padding: 0 var(--s4); border-radius: var(--r-xs); font-size: var(--fs-14); font-weight: var(--fw-semibold); }
.pr-switch .interval button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.pr-track > .pr-pill { min-height: var(--ctl-lg); padding: 0 var(--s3); border-radius: var(--r-full); font-size: var(--fs-14); font-weight: var(--fw-semibold); gap: var(--s2); }
.pr-pills { display: none; }
.pr-track { display: flex; justify-content: center; gap: var(--s2); width: 100%; padding: 0; border: 0; background: none; }
.pr-track > .pr-pill { flex: none; }
.pr-pill[data-tab="pro"] svg { color: var(--primary); }
.pr-pill[data-tab="biz"] svg { color: var(--plan-biz-ink); }
.pr-track > .pr-pill[aria-selected="true"] svg { color: inherit; }
.pr-track > .pr-pill[data-tab="pro"][aria-selected="true"] { background: var(--primary); color: var(--on-primary); box-shadow: var(--shadow-sm); }
.pr-track > .pr-pill[data-tab="biz"][aria-selected="true"] { background: var(--plan-biz-ink); color: var(--plan-biz-on); box-shadow: var(--shadow-sm); }
.pr-pill:focus-visible, .pr-cards:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.pr-foot { margin: 20px 0 0; text-align: center; color: var(--text-muted); font-size: var(--fs-xs); }
.pr-faq { max-width: 720px; margin: 40px auto 0; }
.pr-faq h2 { margin: 0 0 12px; font-size: var(--fs-24, 1.5rem); font-weight: 600; }
.pr-faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); margin-bottom: 8px; }
.pr-faq summary { cursor: pointer; padding: 14px 16px; font-size: var(--fs-md); font-weight: 500; min-height: 44px; box-sizing: border-box; }
.pr-faq details p { margin: 0; padding: 0 16px 14px; color: var(--text-muted); font-size: var(--fs-sm); line-height: 1.6; }
.pr-links { margin: 24px 0 0; text-align: center; font-size: var(--fs-xs); color: var(--text-muted); }
.pr-links a { color: inherit; }

@media (max-width: 960px) {
  .pr-cards { gap: var(--s3); }
  .pr-card { padding: var(--s5) var(--s4) var(--s4); }
  .pr-card.pro { padding: calc(var(--s5) - 1px) calc(var(--s4) - 1px) calc(var(--s4) - 1px); }
}
/* Phone: the three cards are a swipe strip; the next card's edge shows so people know to swipe. Only the strip scrolls
   sideways, never the page (it bleeds to the screen edges with negative margins and pads itself back). */
@media (max-width: 760px) {
  .pr-head { padding: var(--s8) 0 var(--s4); }
  .pr-pills { display: block; position: sticky; top: 0; z-index: var(--z-sticky); margin: 0 calc(-1 * var(--s4)) var(--s2); padding: var(--s2) var(--s4); background: var(--canvas); }
  .pr-cards { display: flex; gap: var(--s3); overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: var(--s4); margin: 0 calc(-1 * var(--s4)); padding: var(--s4) var(--s4) var(--s2); scrollbar-width: none; }
  .pr-cards::-webkit-scrollbar { display: none; }
  .pr-card { flex: 0 0 calc(100% - var(--s8)); scroll-snap-align: start; padding: var(--s5) var(--s4) var(--s4); }
  .pr-card.pro { padding: calc(var(--s5) - 1px) calc(var(--s4) - 1px) calc(var(--s4) - 1px); }
  .pr-who { min-height: 0; }
}
@media (hover: hover) {
  .pr-faq summary:hover { background: var(--sunken); border-radius: var(--r-md); }
}
/* 2026-11-23 (Dorit): on the pricing page the top bar has no Upgrade button (it opened the old Plans box; the cards here are the
   upgrade), and the Business Upgrade is blue with the building icon, not the Pro crown (pricing.js) */
html.on-pricing[data-signed]:not([data-pro]) .top-upgrade:not([data-guest]) { display: none; }
.pr-card.biz .btn.btn-upgrade-biz { --b-bg: color-mix(in srgb, var(--plan-biz-ink) 16%, var(--surface)); --b-fg: var(--plan-biz-ink); --b-bd: transparent; --b-hover: color-mix(in srgb, var(--plan-biz-ink) 26%, var(--surface)); } /* light, like the Pro Upgrade (soft), in blue (Dorit 2026-11-23) */
