/* =============================================================
   QMerse — p-pricing.css (Pricing page only; loads after site.css)
   Three plan cards in the first screen, a plan finder under them, the three limits beside real screens,
   the side-by-side table, and the Creator questions.
   ============================================================= */

/* ---- Hero: one column; the plan cards follow straight on ---- */
.pr-hero { padding-bottom: 0; border-bottom: 0; }
.pr-hero .page-hero-grid { grid-template-columns: minmax(0, 1fr); gap: 22px; align-items: start; }
.pr-hero h1 { font-size: clamp(40px, 5vw, 72px); }
.pr-hero .lede { max-width: 36em; }
.pr-hero .hero-ctas { margin-top: 28px; }
.plans.section { padding-top: clamp(40px, 5vw, 64px); }

/* ---- Plan finder (under the cards): tick what the workflow needs; the plan that fits lights up ---- */
.finder {
  display: grid; grid-template-columns: minmax(0, 0.34fr) minmax(0, 1fr); gap: 18px clamp(20px, 3vw, 40px); align-items: start;
  margin-top: clamp(48px, 6vw, 80px); padding-top: 36px; border-top: 1px solid var(--line);
}
.fd-k { display: block; font-size: 15px; color: var(--text-dim); }
.fd-q { font-family: var(--font-serif); font-size: clamp(22px, 1.9vw, 27px); line-height: 1.15; letter-spacing: -0.015em; color: var(--text); }
.fd-q span { display: block; margin-top: 6px; font-family: var(--font-sans); font-size: 14px; letter-spacing: 0; color: var(--text-dim); }
.fd-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fd-chip {
  display: inline-flex; align-items: center; gap: 9px; padding: 9px 15px 9px 11px; border: 1px solid var(--line-2); border-radius: 18px; background: var(--bg);
  font-size: 14.5px; line-height: 1.2; text-align: start; color: var(--text-mute); transition: border-color 0.25s, background-color 0.25s, color 0.25s;
}
.fd-chip::before { content: ''; flex: none; width: 15px; height: 15px; border-radius: 4px; border: 1px solid var(--line-2); transition: background-color 0.25s, border-color 0.25s; }
.fd-chip:hover { border-color: var(--acc); color: var(--text); }
.fd-chip[aria-pressed="true"] { border-color: var(--acc); background: rgba(var(--acc-rgb),0.09); color: var(--text); }
.fd-chip[aria-pressed="true"]::before { border-color: var(--acc); background: var(--acc) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.3 2.3 4.7-5' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 11px no-repeat; }
.fd-out { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 28px; padding-top: 18px; border-top: 1px solid var(--line); }
.fd-read { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; min-width: 0; flex: 1 1 420px; }
.fd-read .fd-k { color: var(--text-dim); }
.fd-plan { font-family: var(--font-serif); font-weight: 400; font-size: clamp(26px, 2.4vw, 34px); line-height: 1.05; letter-spacing: -0.02em; color: var(--acc-hi); }
.fd-plan.bump { animation: fdBump 0.5s var(--ease-out); }
@keyframes fdBump { from { opacity: 0.2; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.fd-why { flex-basis: 100%; font-size: 15px; line-height: 1.55; color: var(--text-mute); }
.fd-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.fd-go { white-space: nowrap; }
.fd-reset { font-size: 14.5px; color: var(--text-dim); padding: 6px 2px; border-bottom: 1px solid transparent; }
.fd-reset:hover { color: var(--acc-hi); border-color: currentColor; }
.fd-reset[hidden] { display: none; }
html:not(.js) :is(.finder, .cmp-diff) { display: none; }
@media (max-width: 880px) { .finder { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .fd-acts { flex-basis: 100%; justify-content: space-between; } .fd-chips { gap: 6px; } .fd-chip { font-size: 14px; padding: 8px 12px 8px 10px; } }

/* ---- Plan cards ---- */
.plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.plan {
  position: relative; display: flex; flex-direction: column; min-width: 0; padding: clamp(24px, 2.4vw, 30px) clamp(20px, 2vw, 26px) 24px;
  border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); color: var(--text);
  transition: border-color 0.45s var(--ease), box-shadow 0.45s var(--ease), transform 0.45s var(--ease), opacity 0.9s var(--ease-out);
}
.plan.is-start { border-color: rgba(var(--acc-rgb),0.5); background: linear-gradient(180deg, rgba(var(--acc-rgb),0.07), transparent 38%), var(--surface); }
.plan.is-fit::after { position: absolute; top: -12px; padding: 5px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 500; line-height: 1.2; }
.plan > h3 { font-family: var(--font-sans); font-weight: 500; font-size: 18px; letter-spacing: -0.01em; line-height: 1.3; }
.plan-price { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.plan-price .amt { font-family: var(--font-serif); font-size: clamp(44px, 4vw, 56px); line-height: 0.95; letter-spacing: -0.03em; color: var(--text); }
.plan.is-start .plan-price .amt { color: var(--acc-hi); }
.plan-price .per { font-size: 14px; color: var(--text-dim); }
.plan-for { margin-top: 14px; font-size: 15px; line-height: 1.5; color: var(--text-mute); min-height: 3em; }
.plan-list { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.plan-list li { position: relative; padding: 5px 8px 5px 26px; font-size: 15px; line-height: 1.5; color: var(--text-mute); border-radius: 2px;
  transition: background-color 0.4s, color 0.4s; }
.plan-list li::before { content: '✓'; content: '✓' / ''; position: absolute; left: 4px; top: 5px; font-weight: 700; color: var(--text-dim); transition: color 0.4s; }
.plan-list li[data-inc] { color: var(--text); font-weight: 500; }
.plan-list li.is-need { background: rgba(var(--acc-rgb),0.1); color: var(--text); }
.plan-list li.is-need::before { color: var(--acc-hi); }
.plan-cta { margin-top: auto; padding-top: 22px; }
.plan-cta .btn { width: 100%; justify-content: center; white-space: normal; text-align: center; }
.plan-note { margin-top: 14px; font-size: 13.5px; line-height: 1.5; color: var(--text-dim); }
/* on wide screens the three cards share their rows, so names, prices, drawings, lists and buttons line up across */
@supports (grid-template-rows: subgrid) {
  @media (min-width: 1081px) { .plan { display: grid; grid-template-columns: minmax(0, 1fr); grid-row: span 6; grid-template-rows: subgrid; row-gap: 0; } .plan-cta { align-self: end; } }
}
@media (min-width: 1081px) and (max-width: 1260px) { .plan-cta .btn { padding-inline: 16px; } }

/* the finder's verdict on the cards */
.plan.is-fit { border-color: var(--acc); box-shadow: 0 0 0 1px var(--acc), 0 34px 60px -38px var(--shadow); transform: translateY(-4px); }
.plans-wrap.has-pick .plan.is-fit::after { content: 'Fits what you ticked'; content: 'Fits what you ticked' / ''; left: clamp(20px, 2vw, 26px); background: var(--acc-fill); color: var(--on-accent); }

/* the limit-3 drawing: shared against dedicated compute */
.pv-frame { fill: var(--fill); stroke: var(--line-2); stroke-dasharray: 4 4; }
.pv-frame.acc { stroke: var(--acc); stroke-dasharray: none; fill: rgba(var(--acc-rgb),0.04); }
.pv-box, .pv-tgt { fill: var(--bg); stroke: var(--line-2); }
.pv-you { fill: rgba(var(--acc-rgb),0.12); stroke: var(--acc); stroke-width: 1.3; }
.pv-chip { fill: rgba(var(--acc-rgb),0.18); stroke: var(--acc); }
.pv-wire { stroke: var(--acc); stroke-width: 1.2; stroke-dasharray: 3 4; opacity: 0.75; }
.pv-t { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.08em; fill: var(--text-mute); }
.pv-t.dim { fill: var(--text-dim); }
.pv-t.acc { fill: var(--acc-hi); }
.pv-share > rect.pv-box { animation: pvShare 3.6s ease-in-out infinite; }
.pv-share > rect.pv-box:nth-of-type(2n) { animation-delay: -1.8s; }
@keyframes pvShare { 0%, 100% { fill-opacity: 1; } 50% { fill-opacity: 0.35; } }

@media (max-width: 1080px) {
  .plan-grid { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .plan { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); grid-template-rows: auto auto auto 1fr auto; column-gap: clamp(20px, 3vw, 36px); align-items: start; }
  .plan > h3 { grid-column: 1; grid-row: 1; } .plan-price { grid-column: 1; grid-row: 2; } .plan-for { grid-column: 1; grid-row: 3; min-height: 0; }
  .plan-cta { grid-column: 1; grid-row: 4; align-self: end; } .plan-note { grid-column: 1; grid-row: 5; }
  .plan-list { grid-column: 2; grid-row: 1 / 6; margin-top: 0; padding-top: 0; border-top: 0; }
}
@media (max-width: 720px) {
  .plan { display: flex; align-items: stretch; }
  .plan-list { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
}

/* ---- The three limits ---- */
.lims { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 3vw, 40px); margin-bottom: clamp(56px, 6vw, 88px); }
.lim { display: flex; flex-direction: column; color: var(--tp-ink); }
.lim-art { margin: 0 0 20px; }
.lim-art img, .lim-box { display: block; width: 100%; aspect-ratio: 16 / 10; border: 1px solid var(--tp-line); border-radius: 10px; background: #eef1f6; }
.lim-art img { height: auto; object-fit: cover; object-position: var(--op, 50% 50%); }
.lim-box { display: grid; place-items: center; padding: 12px; background-color: #eef3f8;
  background-image: linear-gradient(var(--tp-grid) 1px, transparent 1px), linear-gradient(90deg, var(--tp-grid) 1px, transparent 1px); background-size: 16px 16px; }
.lim-box svg { width: 100%; height: 100%; }
.lim h3 { margin: 4px 0 10px; font-family: var(--font-serif); font-weight: 400; font-size: clamp(24px, 2.1vw, 30px); letter-spacing: -0.02em; line-height: 1.1; color: var(--tp-ink); }
.lim p { font-size: 15px; line-height: 1.6; color: var(--tp-mute); }
/* on paper the drawings keep paper colours in either palette */
[data-tone] .pv-frame { fill: rgba(255,255,255,0.55); stroke: var(--tp-line); }
[data-tone] .pv-frame.acc { stroke: var(--tp-acc); fill: rgba(var(--acc-rgb),0.05); }
[data-tone] .pv-box { fill: #fff; stroke: var(--tp-line); }
[data-tone] .pv-you { stroke: var(--tp-acc); }
[data-tone] .pv-t { fill: var(--tp-mute); }
[data-tone] .pv-t.dim { fill: var(--tp-dim); }
[data-tone] .pv-t.acc { fill: var(--tp-acc); }
@media (max-width: 980px) {
  .lims { grid-template-columns: 1fr; }
  .lim { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: 24px; }
  .lim-art { grid-row: 1 / -1; margin: 0; }
}
@media (max-width: 600px) {
  .lim { display: flex; }
  .lim-art { margin-bottom: 18px; }
}

/* ---- Side by side, with a switch to hide the rows that are the same ---- */
.cmp-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-bottom: 16px; }
.cmp-k { font-family: var(--font-sans); font-size: 20px; font-weight: 500; letter-spacing: -0.01em; color: var(--tp-ink); }
.cmp-diff { display: inline-flex; align-items: center; gap: 11px; font-size: 14.5px; color: var(--tp-ink); padding: 6px 2px; }
.cmp-diff .sw { position: relative; width: 36px; height: 20px; border-radius: 999px; border: 1px solid var(--tp-line); background: rgba(255,255,255,0.7); transition: background-color 0.3s, border-color 0.3s; }
.cmp-diff .sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--tp-dim); transition: transform 0.3s var(--ease), background-color 0.3s; }
.cmp-diff[aria-pressed="true"] .sw { background: var(--acc); border-color: var(--acc); }
.cmp-diff[aria-pressed="true"] .sw::after { transform: translateX(16px); background: #fff; }
.cmp-diff:hover { color: var(--tp-acc); }
.cmp-t { width: 100%; border-collapse: separate; border-spacing: 0; border-bottom: 1px solid var(--tp-line); }
.cmp-t th, .cmp-t td { padding: 16px 24px 16px 0; text-align: start; vertical-align: top; border-top: 1px solid var(--tp-line); font-size: 15.5px; line-height: 1.5; color: var(--tp-mute); transition: background-color 0.4s; }
.cmp-t thead th { border-top: 0; padding-block: 12px; font-weight: 500; font-size: 14.5px; color: var(--tp-ink); }
.cmp-t thead th span { margin-inline-start: 6px; color: var(--tp-dim); font-weight: 400; }
.cmp-t thead th.us, .cmp-t thead th.us span { color: var(--tp-acc); }
.cmp-t tbody th { width: 38%; font-weight: 500; color: var(--tp-ink); }
.cmp-t td:last-child { color: var(--tp-ink); }
.cmp-t .ck { color: var(--tp-ok); font-weight: 700; }
.cmp-t .no { color: var(--tp-dim); }
.cmp-you { display: none; margin-inline-start: 10px; padding: 2px 8px; border-radius: 999px; background: var(--tp-acc); color: #fff; font-weight: 500; font-size: 12px; vertical-align: 1px; white-space: nowrap; }
.cmp-t tr.is-need > * { background-color: rgba(11,82,208,0.08); }
.cmp-t tr.is-need .cmp-you { display: inline-block; }
.cmp-t.only-diff tr[data-same] { display: none; }
.cmp-t.only-diff tbody tr:not([data-same]) { animation: rmFade 0.4s ease both; }
/* phones: the two plans as two columns under one header; each capability spans the row above its values */
@media (max-width: 760px) {
  .cmp-t, .cmp-t thead, .cmp-t tbody { display: block; }
  .cmp-t thead tr, .cmp-t tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .cmp-t thead th:first-child { display: none; }
  .cmp-t thead th span { display: block; margin: 2px 0 0; }
  .cmp-t tbody tr { border-top: 1px solid var(--tp-line); }
  .cmp-t tbody th { grid-column: 1 / -1; width: auto; border-top: 0; padding: 14px 0 4px; }
  .cmp-t td { display: block; border-top: 0; padding: 0 12px 14px 0; font-size: 14.5px; }
}


@media (prefers-reduced-motion: reduce) {
  .pv-share > rect.pv-box { animation: none; }
  .plan.is-fit { transform: none; }
  .fd-plan.bump { animation: none; }
}
