/* khiar — pricing & payment page.
   Loaded after style.css and uses its tokens only: same palette, same type,
   same radii and shadows. Nothing here overrides an existing site class. */

/* ---------- layout: plans beside a live order summary ---------- */
.paygrid{display:flex;flex-wrap:wrap;gap:28px;align-items:flex-start}
.paygrid>.col{flex:1 1 600px;min-width:0;display:flex;flex-direction:column;gap:30px}
.paygrid>.rail{flex:1 1 320px;min-width:0;position:sticky;top:96px;display:flex;flex-direction:column;gap:18px}

/* ---------- billing period switch ---------- */
.billing{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;background:var(--surface);border-radius:999px;padding:8px 8px 8px 22px;box-shadow:0 0 0 1px var(--line)}
.billing .who{font-size:15px;font-weight:500;color:var(--muted)}
.seg{display:inline-flex;background:var(--bg);border-radius:999px;padding:4px;box-shadow:inset 0 0 0 1px var(--line)}
.seg button{border:none;background:transparent;color:var(--ink);font-family:inherit;font-size:15px;font-weight:600;padding:11px 20px;border-radius:999px;cursor:pointer;min-height:44px;transition:background .22s,color .22s}
.seg button:hover{background:#fff}
.seg button[aria-pressed="true"]{background:var(--accent);color:#fff}
.seg button[aria-pressed="true"]:hover{background:var(--accent-d)}
.seg button small{display:block;font-size:12px;font-weight:500;opacity:.8;margin-top:1px}

/* ---------- plan cards ---------- */
.plans{display:flex;flex-wrap:wrap;gap:20px;align-items:stretch}
.plan{position:relative;flex:1 1 210px;min-width:0;display:flex;flex-direction:column;gap:16px;background:var(--surface);border-radius:24px;padding:30px 26px 26px;box-shadow:0 0 0 1px var(--line);cursor:pointer;transition:transform .22s cubic-bezier(.22,.61,.36,1),box-shadow .22s}
.plan:hover{transform:translateY(-3px);box-shadow:0 0 0 1px var(--line),var(--shadow)}
.plan input{position:absolute;width:1px;height:1px;opacity:0;margin:0;pointer-events:none}
.plan.featured{background:linear-gradient(152deg,#fff 38%,var(--lav))}
.plan.selected,.plan:has(input:checked){box-shadow:0 0 0 2px var(--accent),0 16px 40px rgba(68,83,184,.16)}
.plan:focus-within{outline:3px solid var(--accent);outline-offset:3px}
.flag{position:absolute;top:-12px;left:26px;background:var(--accent);color:#fff;font-size:12.5px;font-weight:600;padding:6px 13px;border-radius:999px;box-shadow:0 8px 18px rgba(68,83,184,.28)}
.plan .top{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.plan .name{font-family:'Fraunces',Georgia,serif;font-size:27px;font-weight:600;line-height:1.15;letter-spacing:-.02em}
.plan .tag{font-size:15px;line-height:1.6;color:var(--muted);min-height:48px}
.pick{flex:0 0 24px;width:24px;height:24px;border-radius:50%;box-shadow:inset 0 0 0 1.5px #D8D1C4;display:flex;align-items:center;justify-content:center;transition:box-shadow .22s}
.pick::after{content:"";width:11px;height:11px;border-radius:50%;background:var(--accent);transform:scale(.3);opacity:0;transition:transform .28s cubic-bezier(.22,.61,.36,1),opacity .18s}
.plan.selected .pick,.plan:has(input:checked) .pick{box-shadow:inset 0 0 0 2px var(--accent)}
.plan.selected .pick::after,.plan:has(input:checked) .pick::after{transform:scale(1);opacity:1}
.price{display:flex;align-items:baseline;gap:8px;font-family:'Fraunces',Georgia,serif;font-size:46px;font-weight:600;line-height:1;letter-spacing:-.02em}
.price .cur{font-family:'Inter',system-ui,sans-serif;font-size:19px;font-weight:600;color:var(--muted)}
.price .per{font-family:'Inter',system-ui,sans-serif;font-size:14px;font-weight:500;color:var(--muted)}
.plan .save{font-size:13.5px;font-weight:600;color:var(--accent-d);background:var(--butter);border-radius:999px;padding:7px 13px;align-self:flex-start;line-height:1.35}
.plan.featured .save{background:#fff}
.plan .checks{margin-top:-2px}
.plan .checks li{font-size:15px}
.plan .btn{width:100%;margin-top:auto}

/* ---------- order summary ---------- */
.order{background:var(--surface);border-radius:24px;box-shadow:0 0 0 1px var(--line),var(--shadow);padding:26px;display:flex;flex-direction:column;gap:13px}
.order h3{font-size:22px;font-weight:600}
.order .line{display:flex;justify-content:space-between;align-items:baseline;gap:16px;font-size:15.5px;color:var(--muted);line-height:1.5}
.order .line b{color:var(--ink);font-weight:600;text-align:right}
.order .rule{height:1px;background:var(--line);margin:3px 0}
.order .total{display:flex;justify-content:space-between;align-items:baseline;gap:16px;font-family:'Fraunces',Georgia,serif;font-size:32px;font-weight:600;line-height:1.1}
.order .total .amt{font-variant-numeric:tabular-nums}
.order .fine2{font-size:13px;line-height:1.6;color:var(--muted)}
.order .btn{width:100%}
.trust{background:var(--surface);border-radius:24px;box-shadow:0 0 0 1px var(--line);padding:22px 24px;display:flex;flex-direction:column;gap:12px}
.trust h4{font-family:'Inter',system-ui,sans-serif;font-size:12px;font-weight:600;letter-spacing:.12em;text-transform:uppercase;color:var(--muted)}
.trust .checks li{font-size:14.5px}
.swap{animation:swap .42s cubic-bezier(.22,.61,.36,1)}
@keyframes swap{from{opacity:0;transform:translateY(7px)}to{opacity:1;transform:none}}

/* ---------- payment methods + detail cards ---------- */
.methods{display:flex;flex-wrap:wrap;gap:12px}
.method{display:flex;align-items:center;gap:11px;background:var(--surface);border-radius:14px;box-shadow:0 0 0 1px var(--line);padding:13px 17px;font-size:15px;font-weight:500}
.method i{display:block;width:26px;height:18px;border-radius:4px;background:var(--lav);flex:0 0 26px}
.method i.b{background:var(--blush)}
.method i.c{background:var(--sage)}
.method i.d{background:var(--butter)}

/* ---------- comparison table ---------- */
.cmp td:not(:first-child),.cmp th:not(:first-child){text-align:center}
.cmp td:first-child{font-family:'Inter',system-ui,sans-serif;font-weight:500;font-size:15.5px}
.cmp .yes{color:var(--accent);font-weight:700}
.cmp .no{color:#C6C0CB}
.cmp tr.now td{background:var(--lav)}
.cmp tr.now td:first-child{font-weight:600}

/* ---------- checkout dialog ---------- */
dialog .in{display:flex;flex-direction:column;gap:14px}
dialog .recap{background:var(--lav);border-radius:18px;padding:18px 20px;display:flex;flex-direction:column;gap:8px}
dialog .recap .line{display:flex;justify-content:space-between;gap:16px;font-size:15.5px;color:#4F4C5A}
dialog .recap .line b{color:var(--ink)}
dialog .recap .big{font-family:'Fraunces',Georgia,serif;font-size:26px;font-weight:600;color:var(--ink)}
dialog .next{display:flex;flex-direction:column;gap:8px;font-size:15px;line-height:1.6;color:var(--muted)}
dialog .next li{position:relative;padding-left:24px}
dialog .next li::before{content:"";position:absolute;left:6px;top:9px;width:6px;height:6px;border-radius:50%;background:var(--accent)}
dialog .acts{display:flex;flex-wrap:wrap;gap:12px;margin-top:6px}

/* ---------- responsive ---------- */
@media (max-width:1100px){
  .paygrid>.rail{position:static;flex:1 1 100%;order:2}
  .paygrid>.col{flex:1 1 100%}
}
@media (max-width:640px){
  .billing{padding:14px 16px;border-radius:22px;flex-direction:column;align-items:stretch}
  .billing .who{text-align:center}
  .seg{width:100%}
  .seg button{flex:1;padding:11px 12px}
  .plan{padding:26px 22px 22px}
  .price{font-size:40px}
  .plan .tag{min-height:0}
  .order{padding:22px 20px}
  dialog .recap{padding:16px}
}
@media (prefers-reduced-motion:reduce){
  .js .rv{opacity:1;transform:none}
  .swap{animation:none}
}
