/* ==========================================================================
   Pricing page
   ========================================================================== */

/* ---------- Hero ---------- */
.p-hero { padding: clamp(56px, 8vw, 112px) 0 clamp(36px, 5vw, 56px); }
.p-hero .lead { margin-top: 18px; }

/* ---------- Billing toggle (segmented radio group) ---------- */
.billing {
  --pad: 4px;
  position: relative;
  display: inline-grid; grid-template-columns: 1fr 1fr; align-items: stretch;
  margin-top: 40px; padding: var(--pad);
  background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--pill);
}
.billing-thumb {
  position: absolute; top: var(--pad); bottom: var(--pad); left: var(--pad);
  width: calc(50% - var(--pad));
  border-radius: var(--pill); background: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: transform 0.45s var(--ease);
}
.billing[data-period="year"] .billing-thumb { transform: translateX(100%); }
.billing.is-init .billing-thumb { transition: none; }
.billing-opt { position: relative; display: block; cursor: pointer; }
.billing-opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.billing-label {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 22px;
  font-size: 16px; font-weight: 600; letter-spacing: -0.005em; color: var(--ink-2);
  border-radius: var(--pill); white-space: nowrap;
  transition: color 0.3s;
}
.billing-opt:hover .billing-label { color: var(--ink); }
.billing-opt input:checked + .billing-label { color: var(--paper); }
.billing-opt input:focus-visible + .billing-label { outline: 2px solid var(--olive); outline-offset: 2px; }
.save {
  padding: 3px 9px; border-radius: var(--pill);
  background: var(--olive-soft); color: var(--olive);
  font-size: 12.5px; font-weight: 650; letter-spacing: 0; line-height: 1.2;
  transition: background-color 0.3s, color 0.3s;
}
.billing-opt input:checked + .billing-label .save { background: rgb(244 241 234 / 0.16); color: var(--paper); }

/* ---------- Plan cards ---------- */
.p-plans { padding-bottom: 0; }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.plan {
  position: relative; display: flex; flex-direction: column;
  padding: 32px 30px 30px;
  background: var(--surface);
  border: 1.5px solid var(--line); border-radius: 24px;
}
.plan-rec { border-color: var(--ink); box-shadow: var(--shadow); }
.plan-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 32px; }
.rec-pill {
  padding: 5px 12px; border-radius: var(--pill);
  background: var(--ink); color: var(--paper);
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.005em; line-height: 1.2;
}
.plan-pitch { margin-top: 8px; font-size: 16px; color: var(--ink-2); }
.plan-price { display: flex; align-items: baseline; gap: 2px; margin-top: 30px; }
.plan-amount {
  font-size: clamp(44px, 4.4vw, 54px); font-weight: 700; letter-spacing: -0.045em; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.plan-unit { font-size: 17px; font-weight: 500; color: var(--muted); margin-left: 3px; }
.plan-sub { margin-top: 10px; min-height: 1.5em; }
.plan .btn { margin-top: 22px; }
ul.checks { list-style: none; padding: 26px 0 0; margin: 26px 0 0; border-top: 1px solid var(--line); display: grid; gap: 13px; }
.checks li { display: flex; align-items: flex-start; gap: 12px; font-size: 16px; line-height: 1.4; color: var(--ink-2); }
.ck { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--olive); }

.is-swap { animation: price-in 0.45s var(--ease) both; }
@keyframes price-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.plan-notes { margin-top: 36px; display: grid; gap: 6px; }

@media (max-width: 959px) {
  .plans { grid-template-columns: minmax(0, 1fr); max-width: 480px; margin-inline: auto; }
}

/* ---------- Compare table ---------- */
.p-compare { padding-top: calc(var(--section) * 0.6); }
.compare { max-width: 980px; margin-inline: auto; }
.cmp { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 16px; table-layout: fixed; }
.cmp th, .cmp td { padding: 16px 12px; text-align: center; vertical-align: middle; border-bottom: 1px solid var(--line); background: var(--paper); }
.cmp .cmp-rec { background: var(--surface); }
.cmp thead th {
  position: sticky; top: var(--nav-h); z-index: 3;
  padding: 18px 12px 16px; border-bottom: 1px solid var(--line-2);
  font-weight: 650; vertical-align: bottom;
}
.cmp-name { display: block; font-size: 18px; letter-spacing: -0.015em; color: var(--ink); }
.cmp-price { display: block; margin-top: 2px; font-size: 13px; font-weight: 400; color: var(--muted); }
.cmp-feature { width: 40%; }
.cmp thead th:not(.cmp-feature) { width: 20%; }
.cmp tbody th[scope="row"] { text-align: left; padding-left: 0; font-weight: 500; font-size: 16px; color: var(--ink-2); line-height: 1.35; }
.cmp tr.group th {
  padding: 44px 0 14px; text-align: left;
  font-size: 15px; font-weight: 650; letter-spacing: -0.005em; color: var(--ink);
  border-bottom: 1px solid var(--line-2); background: var(--paper);
}
.cmp tbody tr.group:first-child th { padding-top: 32px; }
.cmp td.y svg { width: 20px; height: 20px; margin-inline: auto; color: var(--olive); }
.cmp td.v { font-size: 15px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.cmp .dash { display: block; width: 12px; height: 1.5px; margin-inline: auto; border-radius: 2px; background: var(--line-2); }
.cmp tbody tr:not(.group):last-child th, .cmp tbody tr:not(.group):last-child td { border-bottom-color: var(--line-2); }

@media (max-width: 760px) {
  .compare { overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
  .compare:focus-visible { outline-offset: 4px; }
  .cmp { min-width: 392px; }
  .cmp th, .cmp td { padding-inline: 6px; }
  .cmp thead th { position: static; top: auto; }
  .cmp-feature { width: 128px; }
  .cmp thead th:not(.cmp-feature) { width: 88px; }
  .cmp thead th.cmp-feature, .cmp tbody th[scope="row"] {
    position: sticky; top: auto; left: 0; z-index: 2; background: var(--paper);
    box-shadow: 1px 0 0 var(--line);
  }
  .cmp tbody th[scope="row"] { padding-left: 0; padding-right: 10px; font-size: 14.5px; }
  .cmp tr.group th { position: sticky; left: 0; }
}

/* ---------- FAQ ---------- */
.faq-layout { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.faq-title { position: sticky; top: calc(var(--nav-h) + 40px); }
.faq { border-top: 1px solid var(--line-2); }
.faq details { border-bottom: 1px solid var(--line-2); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  min-height: 72px; padding: 20px 0;
  font-size: 19px; font-weight: 600; letter-spacing: -0.012em; line-height: 1.3;
  cursor: pointer; list-style: none; border-radius: 4px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover .faq-icon::before, .faq summary:hover .faq-icon::after { background: var(--ink); }
.faq summary:focus-visible { outline-offset: 2px; }
.faq-icon { position: relative; flex: none; width: 20px; height: 20px; }
.faq-icon::before, .faq-icon::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 16px; height: 1.75px; margin: -0.875px 0 0 -8px; border-radius: 2px;
  background: var(--ink-2);
  transition: transform 0.4s var(--ease), background-color 0.2s;
}
.faq-icon::after { transform: rotate(90deg); }
.faq details[open]:not(.is-closing) .faq-icon::after { transform: rotate(0deg); }
.faq-a { overflow: hidden; }
.faq-a p { max-width: 50ch; padding: 0 44px 26px 0; font-size: 17px; color: var(--ink-2); }

@media (max-width: 859px) {
  .faq-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .faq-title { position: static; }
}

/* ---------- Closing band ---------- */
.p-cta { padding-block: clamp(80px, 10vw, 128px); }
.p-cta .beta-form { margin-top: 36px; }
.p-cta .btn-lg { margin-top: 32px; }

@media (max-width: 420px) {
  .billing-label { padding: 0 12px; gap: 6px; font-size: 15px; }
  .save { padding: 3px 8px; font-size: 12px; }
}
