/* Public /pricing page (Basecamp-style sheet on the marketing site).
   Uses the tokens from home.css. The billing and plan switches are radio
   buttons; :has() shows the matching content, so no script is needed. */

.pr-body { background: var(--mk-bg-alt); }
.pr-main { padding-top: 32px; padding-bottom: 48px; }
.pr-sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.pr-sheet {
  display: flex; flex-direction: column; gap: 28px;
  padding: 24px 16px; border-radius: 24px;
  background: #fff; box-shadow: 0 1px 2px rgba(10, 13, 18, 0.05);
}

.pr-head { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.pr-head h1 { margin: 0; font-size: 28px; line-height: 1.2; letter-spacing: -0.02em; }
.pr-head p { margin: 0; max-width: 620px; color: var(--mk-muted); font-size: 16px; line-height: 1.55; }
.pr-head p strong { color: var(--mk-ink); }

/* Monthly / yearly switch */
.pr-switch {
  display: inline-flex; gap: 4px; margin: 8px 0 0; padding: 4px;
  border: 0; border-radius: 999px; background: var(--mk-bg-alt);
}
.pr-switch input { position: absolute; opacity: 0; pointer-events: none; }
.pr-switch label {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border-radius: 999px; color: var(--mk-muted); font-size: 15px; font-weight: 500; cursor: pointer;
}
.pr-switch input:checked + label {
  background: #fff; color: var(--mk-ink); font-weight: 600;
  box-shadow: 0 1px 2px rgba(10, 13, 18, 0.08);
}
.pr-switch input:focus-visible + label { outline: 2px solid var(--mk-primary); outline-offset: 2px; }
.pr-save {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px;
  border-radius: 999px; background: #ecfdf3; color: #067647; font-size: 12px; font-weight: 600;
}

.pr-when-yearly { display: none; }
.pr-sheet:has(#bill-yearly:checked) .pr-when-yearly { display: block; }
.pr-sheet:has(#bill-yearly:checked) .pr-when-monthly { display: none; }

/* Plan cards */
.pr-plans { display: grid; gap: 12px; grid-template-columns: 1fr; }
.pr-plan {
  position: relative; display: flex; flex-direction: column; gap: 12px;
  padding: 20px; border-radius: 18px; border: 1px solid var(--mk-line);
}
.pr-plan.is-popular { border: 2px solid var(--mk-primary); background: #eef3ff; }
.pr-badge {
  position: absolute; top: -12px; left: 20px; margin: 0; height: 24px; padding: 0 10px;
  display: inline-flex; align-items: center; border-radius: 999px;
  background: var(--mk-primary); color: #fff; font-size: 12px; font-weight: 600;
}
.pr-plan h2 { margin: 0; font-size: 18px; font-weight: 800; }
.pr-desc { margin: 0; color: var(--mk-muted); font-size: 13px; line-height: 1.45; }
.pr-price { margin: 0; color: var(--mk-muted); font-size: 13px; }
.pr-price strong { color: var(--mk-ink); font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.pr-price small { display: block; margin-top: 2px; font-size: 12px; }
.pr-plan ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; color: var(--mk-muted); font-size: 14px; }
.pr-plan ul strong { color: var(--mk-ink); }
.pr-plus { font-size: 13px; }
.pr-check::before { content: "✓"; margin-right: 6px; color: #067647; font-weight: 700; }

.pr-addon {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px;
  padding: 16px 20px; border-radius: 18px; background: var(--mk-bg-alt); font-size: 15px;
}
.pr-addon span { flex: 1 1 240px; color: var(--mk-muted); }

/* Comparison */
.pr-compare { display: flex; flex-direction: column; gap: 12px; }
.pr-compare h2 { margin: 12px 0 0; text-align: center; font-size: 24px; }
.pr-table-wrap { display: none; overflow-x: auto; }
.pr-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.pr-table thead th { padding: 12px 8px; font-weight: 800; }
.pr-table thead th.is-popular { color: var(--mk-primary); }
.pr-table td { padding: 12px 8px; text-align: center; color: var(--mk-muted); border-bottom: 1px solid #f0f0f1; }
.pr-table tbody th[scope="row"] { padding: 12px 8px; text-align: left; font-weight: 500; border-bottom: 1px solid #f0f0f1; }
.pr-group th { padding: 20px 8px 8px; text-align: left; color: var(--mk-muted); font-size: 13px; font-weight: 600; border-bottom: 1px solid var(--mk-line); }
.pr-yes { color: #067647; font-weight: 700; }
.pr-no { color: #a4a7ae; }

.pr-picker { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; border: 0; }
.pr-picker input { position: absolute; opacity: 0; pointer-events: none; }
.pr-picker label {
  min-height: 40px; padding: 0 14px; display: inline-flex; align-items: center;
  border-radius: 999px; border: 1px solid var(--mk-line); font-size: 14px; cursor: pointer;
}
.pr-picker input:checked + label { background: var(--mk-ink); border-color: var(--mk-ink); color: #fff; font-weight: 600; }
.pr-picker input:focus-visible + label { outline: 2px solid var(--mk-primary); outline-offset: 2px; }

.pr-list { display: none; margin: 0; font-size: 14px; }
.pr-list dt { padding: 14px 0 6px; color: var(--mk-muted); font-size: 13px; font-weight: 600; }
.pr-list dd { margin: 0; display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f0f0f1; }
.pr-cell { flex-shrink: 0; font-weight: 600; }
.pr-compare:has(#pr-plan-1:checked) .pr-list-1,
.pr-compare:has(#pr-plan-2:checked) .pr-list-2,
.pr-compare:has(#pr-plan-3:checked) .pr-list-3,
.pr-compare:has(#pr-plan-4:checked) .pr-list-4,
.pr-compare:has(#pr-plan-5:checked) .pr-list-5,
.pr-compare:has(#pr-plan-6:checked) .pr-list-6,
.pr-compare:has(#pr-plan-7:checked) .pr-list-7,
.pr-compare:has(#pr-plan-8:checked) .pr-list-8,
.pr-compare:has(#pr-plan-9:checked) .pr-list-9,
.pr-compare:has(#pr-plan-10:checked) .pr-list-10 { display: block; }

.pr-final {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 28px; border-radius: 20px; background: #eef3ff; text-align: center;
}
.pr-final h2 { margin: 0; font-size: 24px; }
.pr-final p { margin: 0; color: var(--mk-muted); }

@media (min-width: 640px) {
  .pr-sheet { padding: 40px; }
  .pr-head h1 { font-size: 36px; }
  .pr-plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
  .pr-plans { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
  .pr-table-wrap { display: block; }
  .pr-picker, .pr-compare .pr-list { display: none !important; }
}

.mk-nav a[aria-current="page"] { color: var(--mk-primary); font-weight: 600; }
