/* pay.pipflare.com — static checkout page.
   Same tokens as the Pipflare landing (slate-950 surface, blue primary scale,
   Inter for UI, IBM Plex Mono for the wordmark only, emerald pip).
   Mobile-first: correct with no media query; the queries only enhance. */

:root {
  --bg: #020617;            /* slate-950 */
  --surface: rgba(15, 23, 42, 0.5);   /* slate-900/50 */
  --surface-solid: #0f172a; /* slate-900 */
  --border: #1e293b;        /* slate-800 */
  --border-strong: #334155; /* slate-700 */
  --text: #f1f5f9;          /* slate-100 */
  --text-2: #cbd5e1;        /* slate-300 */
  --muted: #94a3b8;         /* slate-400 */
  --dim: #64748b;           /* slate-500 */
  --primary-400: #60a5fa;
  --primary-500: #3b82f6;
  --primary-600: #2563eb;
  --primary-700: #1d4ed8;
  --emerald: #10b981;
  --radius: 16px;
  --radius-sm: 8px;
  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-logo: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main { flex: 1; }

h1, h2, h3, p, ul, ol, dl, dd, fieldset, legend { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }

a { color: var(--primary-400); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--primary-400);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: 1152px;   /* max-w-6xl */
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 16px;
  top: 12px;
  z-index: 50;
  padding: 10px 14px;
  background: var(--primary-600);
  color: #fff;
  border-radius: var(--radius-sm);
}

/* ── Buttons ─────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--primary-600); color: #fff; font-weight: 600; }
.btn-primary:hover { background: var(--primary-700); }
.btn-outline { border-color: var(--border-strong); color: #e2e8f0; background: transparent; }
.btn-outline:hover { background: var(--border); }
.btn-ghost { color: #e2e8f0; background: transparent; }
.btn-ghost:hover { background: rgba(30, 41, 59, 0.6); color: #fff; }

/* ── Header ──────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(30, 41, 59, 0.8);
  background: rgba(2, 6, 23, 0.8);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: #fff;
}
.brand:hover { text-decoration: none; }
.pipmark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #fafaf9;
}
.brand-text { display: block; min-width: 0; }
.wordmark {
  display: block;
  font-family: var(--font-logo);
  font-size: 19px;
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1;
  color: #fff;
}
.wordmark b { font-weight: 500; }
.brand-sub {
  display: block;
  margin-top: 3px;
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--muted);
  white-space: nowrap;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.secure-badge {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.08);
  color: #6ee7b7;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

/* ── Hero ────────────────────────────────────────────── */
.hero {
  border-bottom: 1px solid rgba(30, 41, 59, 0.8);
  background: rgba(15, 23, 42, 0.4);
  padding: 36px 0 28px;
}
.hero h1 {
  font-size: 28px;
  line-height: 1.2;
  font-weight: 700;
  color: #fff;
}
.lede {
  max-width: 680px;
  margin-top: 12px;
  color: var(--muted);
}
.steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-top: 22px;
}
.steps li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
}
.step-n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--border);
  color: var(--text-2);
  font-size: 11.5px;
  font-weight: 600;
}
.steps li.is-current {
  border-color: rgba(59, 130, 246, 0.45);
  background: rgba(37, 99, 235, 0.12);
  color: #fff;
}
.steps li.is-current .step-n { background: var(--primary-600); color: #fff; }

/* ── Checkout layout ─────────────────────────────────── */
.checkout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  padding: 28px 0 8px;
}
.checkout-main {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 20px;
}
.card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 17px;
  font-weight: 600;
  color: #fff;
}
/* <legend> ignores display:flex in some engines unless it is floated. */
legend.card-title { float: left; width: 100%; }
legend.card-title + * { clear: both; }

.num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.18);
  color: var(--primary-400);
  font-size: 13px;
  font-weight: 600;
}
.body { color: var(--text-2); font-size: 14px; }
.hint { margin-top: 14px; color: var(--dim); font-size: 13px; }

/* ── Selectable options (plan + method) ──────────────── */
.option {
  position: relative;
  display: block;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.4);
  cursor: pointer;
  transition: border-color .15s, background-color .15s;
}
.option:hover { border-color: var(--border-strong); }
.option input {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--primary-500);
  cursor: pointer;
}
.option:has(input:checked) {
  border-color: rgba(59, 130, 246, 0.6);
  background: linear-gradient(to bottom, rgba(37, 99, 235, 0.12), rgba(15, 23, 42, 0.5));
}
.option:has(input:focus-visible) {
  outline: 2px solid var(--primary-400);
  outline-offset: 2px;
}
.option-body { display: block; padding: 16px 48px 16px 16px; }
.option-name { display: block; font-size: 15px; font-weight: 600; color: #fff; }
.option-desc { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); }

.option-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
}
.option-plan .option-name { font-size: 17px; }
.option-price { font-size: 26px; font-weight: 700; color: #fff; line-height: 1.1; }
.option-price small { font-size: 13px; font-weight: 500; color: var(--muted); }

.ticks { display: grid; gap: 8px; margin-top: 14px; }
.ticks li {
  position: relative;
  padding-left: 24px;
  font-size: 13.5px;
  color: var(--text-2);
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 5px;
  width: 11px;
  height: 6px;
  border-left: 2px solid var(--primary-400);
  border-bottom: 2px solid var(--primary-400);
  transform: rotate(-45deg);
}

.methods {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.option-method .option-body { padding: 14px 40px 14px 14px; }
.option-method input { top: 14px; right: 12px; }
.method-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-bottom: 10px;
  border-radius: 10px;
  background: var(--border);
  color: var(--text-2);
}
.option:has(input:checked) .method-icon {
  background: rgba(37, 99, 235, 0.25);
  color: #bfdbfe;
}

/* ── Method panels: only the selected one is shown ───── */
.panel {
  display: none;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.4);
}
.panel h3 { font-size: 14px; font-weight: 600; color: #fff; }
.facts { display: grid; gap: 8px; margin-top: 10px; }
.facts li {
  position: relative;
  padding-left: 16px;
  font-size: 13.5px;
  color: var(--text-2);
}
.facts li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--emerald);
}
.facts strong { color: #fff; font-weight: 600; }

.checkout:has(#m-card:checked)   .panel-card,
.checkout:has(#m-paypal:checked) .panel-paypal,
.checkout:has(#m-skrill:checked) .panel-skrill,
.checkout:has(#m-crypto:checked) .panel-crypto { display: block; }

/* Method-dependent summary text */
.sum-m { display: none; }
.checkout:has(#m-card:checked)   .sum-m-card,
.checkout:has(#m-paypal:checked) .sum-m-paypal,
.checkout:has(#m-skrill:checked) .sum-m-skrill,
.checkout:has(#m-crypto:checked) .sum-m-crypto { display: inline; }

/* Plan-dependent summary — one rule per plan radio.
   Adding a plan "team": add `.sum-plan-team` elements next to the
   `.sum-plan-pro` ones in index.html, then add:
   .checkout:has(#plan-team:checked) .sum-plan-team { display: inline; } */
.sum-plan { display: none; }
.checkout:has(#plan-pro:checked) .sum-plan-pro { display: inline; }

/* ── Account links ───────────────────────────────────── */
.acct-links {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

/* ── Summary ─────────────────────────────────────────── */
.summary { min-width: 0; }
.summary-title { font-size: 17px; font-weight: 600; color: #fff; }
.lines { margin-top: 14px; }
.line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(30, 41, 59, 0.7);
  font-size: 14px;
}
.line dt { color: var(--muted); }
.line dd { color: var(--text); font-weight: 500; text-align: right; }
.total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0 18px;
  color: var(--text-2);
  font-size: 15px;
  font-weight: 500;
}
.total strong { font-size: 26px; font-weight: 700; color: #fff; }
.total small { font-size: 12px; font-weight: 500; color: var(--muted); }
.btn-pay { width: 100%; min-height: 50px; font-size: 15px; }
.fine { margin-top: 12px; font-size: 12.5px; color: var(--dim); }
.trust {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.trust li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 13px;
  color: var(--muted);
}
.trust svg { flex-shrink: 0; margin-top: 2px; color: var(--emerald); }

/* ── Sections below the form ─────────────────────────── */
/* margin, not padding: .wrap owns the horizontal padding shorthand. */
.section { margin-top: 44px; }
.section-title { font-size: 20px; font-weight: 700; color: #fff; }

.next-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  margin-top: 16px;
}
.next {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 20px;
}
.next-n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.18);
  color: var(--primary-400);
  font-size: 14px;
  font-weight: 600;
}
.next h3 { margin-top: 12px; font-size: 15px; font-weight: 600; color: #fff; }
.next p { margin-top: 6px; font-size: 13.5px; color: var(--muted); }

.faq { margin-bottom: 64px; }
.faq details { max-width: 800px; }
.faq .section-title { margin-bottom: 14px; }
.faq details {
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}
.faq summary {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 12px 46px 12px 18px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
  color: var(--dim);
}
.faq details[open] summary::after { content: "\2212"; }
.faq details p {
  padding: 0 18px 16px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
}

/* ── Footer ──────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid rgba(30, 41, 59, 0.8);
  background: var(--bg);
}
.footer-row { padding-top: 24px; padding-bottom: 24px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  font-size: 13.5px;
  color: var(--muted);
}
.footer-links a:hover { color: #fff; text-decoration: none; }
.footer-base { border-top: 1px solid rgba(30, 41, 59, 0.8); }
.footer-base-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 18px;
  padding-bottom: 18px;
  font-size: 12px;
  color: var(--muted);
}

/* ── Enhancements ────────────────────────────────────── */
@media (max-width: 479px) {
  .header-right .btn { padding: 10px 12px; font-size: 13px; }
}

@media (min-width: 640px) {
  .wrap { padding-left: 24px; padding-right: 24px; }
  .hero { padding: 52px 0 36px; }
  .hero h1 { font-size: 36px; }
  .card { padding: 28px; }
  .secure-badge { display: inline-flex; }
  .methods { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .acct-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .next-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-base-row { flex-direction: row; align-items: center; justify-content: space-between; }
}

@media (min-width: 1024px) {
  .checkout {
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 28px;
    align-items: start;
    padding-top: 40px;
  }
  .summary { position: sticky; top: 88px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .option { transition: none; }
}

@media print {
  .site-header { position: static; }
  .btn-pay, .header-right { display: none; }
}
