/* plg-checkout — funnel chrome + page styles.
 * Brand: Montserrat, blue #3f84e5. Layered on the SmallWorld style guide tokens.
 * Self-contained: these are pre-login marketing pages, no app chrome. */

:root {
  --blue: #3f84e5;
  --blue-600: #2e6ec5;
  --blue-50: #F1F7FF;
  --blue-100: #dbeafe;
  --ink: #222;
  --ink-700: #444;
  --gray-500: #77797B;
  --gray-400: #9DA1A5;
  --border: #e1e5e9;
  --border-card: #e8ebef;
  --divider: #f0f2f5;
  --surface: #fff;
  --bg: #FBFCFE;
  --bg-muted: #f5f7fa;
  --success: #16a34a;
  --danger: #dc2626;
  --radius-card: 10px;
  --radius-ctrl: 6px;
  --shadow-card: 0 1px 3px rgba(16,24,40,0.04), 0 1px 2px rgba(16,24,40,0.03);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Montserrat', sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-600); }

/* ---------- Funnel chrome ---------- */
.funnel-bar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.funnel-bar-inner {
  max-width: 1120px; margin: 0 auto;
  height: 56px; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.funnel-logo { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.funnel-logo img { height: 28px; width: auto; display: block; }
.funnel-logo .wordmark { font-size: 20px; line-height: 1; text-transform: uppercase; letter-spacing: 0.02em; color: var(--ink); }
.funnel-logo .wordmark .b { font-weight: 800; }
.funnel-logo .wordmark .t { font-weight: 300; }
.funnel-logo .wordmark .reg { font-size: 0.5em; font-weight: 400; vertical-align: super; margin-left: 1.5px; letter-spacing: 0; }
.funnel-logo .mark {
  width: 26px; height: 26px; border-radius: 7px;
  background: linear-gradient(135deg, #3f84e5, #5b9bf0);
  display: grid; place-items: center; color: #fff; font-size: 14px; font-weight: 800;
}
.funnel-bar-right { display: flex; align-items: center; gap: 18px; font-size: 13px; font-weight: 500; }
.funnel-bar-right a { color: var(--gray-500); }
.funnel-bar-right a:hover { color: var(--ink); }

.funnel-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-muted);
  margin-top: 64px;
}
.funnel-footer-inner {
  max-width: 1120px; margin: 0 auto; padding: 22px 24px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: var(--gray-400); flex-wrap: wrap; gap: 8px;
}
.funnel-footer-inner nav { display: flex; gap: 16px; }
.funnel-footer-inner a { color: var(--gray-500); }

/* ---------- Generic layout ---------- */
.page { max-width: 1120px; margin: 0 auto; padding: 48px 24px; }
.page-narrow { max-width: 460px; margin: 0 auto; padding: 48px 24px; }
.eyebrow { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.2px; color: var(--blue); margin-bottom: 10px; }
.h1 { font-size: 34px; font-weight: 800; letter-spacing: -1px; color: var(--ink); }
.h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.3px; color: var(--ink); }
.lede { font-size: 15px; color: var(--gray-500); line-height: 1.6; }
.center { text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  font-family: 'Montserrat', sans-serif; font-weight: 600; border: none;
  border-radius: 4px; cursor: pointer; transition: all 0.15s;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 14px; padding: 11px 20px;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-600); color: #fff; }
.btn-secondary { background: #F1F5F9; color: #57595B; }
.btn-secondary:hover { background: var(--border); }
.btn-ghost { background: #fff; color: var(--ink); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: #ccd1d6; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: 0.45; cursor: not-allowed; }
.btn-google { background: #fff; color: var(--ink); border: 1px solid var(--border); font-weight: 600; }
.btn-google:hover { background: #fafbfc; }
.btn-google svg { width: 18px; height: 18px; }

/* ---------- Forms ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12px; font-weight: 600; color: var(--ink-700); margin-bottom: 6px; }
.input {
  width: 100%; font-family: 'Montserrat', sans-serif; font-size: 14px;
  padding: 11px 12px; border: 1px solid var(--border); border-radius: var(--radius-ctrl);
  background: #fff; color: var(--ink); transition: border-color 0.15s, box-shadow 0.15s;
}
.input::placeholder { color: var(--gray-400); }
.input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(63,132,229,0.15); }
.input.is-error { border-color: var(--danger); }
.input.is-error:focus { box-shadow: 0 0 0 3px rgba(220,38,38,0.12); }
.field-hint { font-size: 11px; color: var(--gray-400); margin-top: 6px; }
.field-error { font-size: 11px; color: var(--danger); margin-top: 6px; }
.input-wrap { position: relative; }
.input-affix {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font-size: 12px; font-weight: 600; color: var(--gray-500); background: none; border: none;
  cursor: pointer; padding: 4px;
}
.input-affix:hover { color: var(--ink); }

.divider-or { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--gray-400); font-size: 12px; }
.divider-or::before, .divider-or::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.card {
  background: var(--surface); border: 1px solid var(--border-card);
  border-radius: var(--radius-card); box-shadow: var(--shadow-card);
}

/* Order pill (small badge showing chosen plan) */
.order-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--blue-50); border: 1px solid #d4e5fb; border-radius: 999px;
  padding: 6px 14px; font-size: 12px; font-weight: 600; color: var(--blue-600);
}
.order-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); }

/* ---------- Pricing ---------- */
.billing-head { display: flex; justify-content: center; margin-bottom: 28px; }

.billing-toggle {
  display: inline-flex; align-items: center; gap: 4px;
  background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: 4px;
}
.billing-toggle button {
  font-family: 'Montserrat', sans-serif; font-size: 13px; font-weight: 600;
  border: none; background: none; color: var(--gray-500); cursor: pointer;
  padding: 7px 16px; border-radius: 999px; transition: all 0.15s; display: inline-flex; align-items: center; gap: 6px;
}
.billing-toggle button.active { background: var(--blue); color: #fff; }
.billing-toggle .save-tag { font-size: 10px; font-weight: 700; background: #e7f7ee; color: var(--success); padding: 2px 7px; border-radius: 999px; }
.billing-toggle button.active .save-tag { background: rgba(255,255,255,0.22); color: #fff; }

.plans-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: start; }
.plan {
  background: #fff; border: 1px solid var(--border-card); border-radius: 14px;
  padding: 28px 24px; position: relative; display: flex; flex-direction: column;
  box-shadow: var(--shadow-card);
}
.plan.is-popular { border: 2px solid var(--blue); box-shadow: 0 12px 32px rgba(63,132,229,0.14); }
.plan-flag {
  position: absolute; top: -12px; left: 24px;
  background: var(--blue); color: #fff; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.7px; padding: 4px 12px; border-radius: 999px;
}
.plan-name { font-size: 18px; font-weight: 700; color: var(--ink); }
.plan-tagline { font-size: 12.5px; color: var(--gray-500); margin-top: 6px; min-height: 36px; }

/* Relationships headline (the price driver) */
.plan-rels { margin-top: 18px; display: flex; align-items: baseline; gap: 7px; min-height: 30px; }
.plan-rels .rels-num { font-size: 22px; font-weight: 800; letter-spacing: -0.6px; color: var(--blue-600); }
.plan-rels .rels-unit { font-size: 12px; font-weight: 600; color: var(--gray-500); }

.plan-price { margin: 10px 0 4px; display: flex; align-items: baseline; gap: 6px; min-height: 44px; }
.plan-price .amount { font-size: 38px; font-weight: 800; letter-spacing: -1.5px; color: var(--ink); }
.plan-price .per { font-size: 13px; color: var(--gray-500); font-weight: 500; }
.plan-price .custom { font-size: 26px; font-weight: 800; color: var(--ink); letter-spacing: -0.6px; }
.plan-billing-note { font-size: 11px; color: var(--gray-400); min-height: 16px; }

.plan-limits { margin: 20px 0; border-top: 1px solid var(--divider); border-bottom: 1px solid var(--divider); padding: 4px 0; }
.plan-limit { display: flex; align-items: center; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--divider); }
.plan-limit:last-child { border-bottom: none; }
.plan-limit .lim-label { font-size: 12px; color: var(--gray-500); }
.plan-limit .lim-label .lim-hint { display: block; font-size: 10px; color: var(--gray-400); margin-top: 1px; }
.plan-limit .lim-value { font-size: 16px; font-weight: 700; color: var(--ink); }

.plan-features { list-style: none; margin: 4px 0 24px; display: flex; flex-direction: column; gap: 9px; }
.plan-features li { font-size: 12.5px; color: var(--ink-700); display: flex; align-items: flex-start; gap: 8px; }
.plan-features li .tick { color: var(--success); font-weight: 800; flex-shrink: 0; }
.plan .btn { margin-top: auto; }

/* Overage line under the price */
.plan-billing-note .overage { display: block; font-size: 11px; color: var(--gray-400); margin-top: 3px; }

/* Unlimited users callout on self-serve cards */
.plan-unlimited {
  display: flex; align-items: center; gap: 7px; margin: 14px 0 2px;
  font-size: 12px; font-weight: 600; color: var(--blue-600);
  background: var(--blue-50); border: 1px solid #d9e8fc; border-radius: 8px; padding: 9px 11px;
}
.plan-unlimited .tick { color: var(--success); font-weight: 800; }

/* ---------- Add-ons strip (pricing page) ---------- */
.addons-strip { margin-top: 44px; border-top: 1px solid var(--divider); padding-top: 32px; }
.addons-head { text-align: center; margin-bottom: 20px; }
.addons-title { font-size: 18px; font-weight: 700; color: var(--ink); letter-spacing: -0.3px; }
.addons-sub { font-size: 13px; color: var(--gray-500); margin-top: 4px; }
.addons-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; max-width: 760px; margin: 0 auto; }
.addon-card {
  background: #fff; border: 1px solid var(--border-card); border-radius: 12px;
  padding: 18px 20px; box-shadow: var(--shadow-card);
}
.addon-card .addon-name { font-size: 14px; font-weight: 700; color: var(--ink); }
.addon-card .addon-price { font-size: 13px; font-weight: 600; color: var(--blue-600); margin-top: 4px; }

/* ---------- 6-digit code input ---------- */
.code-inputs { display: flex; gap: 10px; justify-content: center; margin: 8px 0 4px; }
.code-box {
  width: 52px; height: 60px; text-align: center; font-size: 26px; font-weight: 700;
  border: 1px solid var(--border); border-radius: 8px; color: var(--ink);
  font-family: 'Montserrat', sans-serif; transition: all 0.15s; background: #fff;
}
.code-box:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(63,132,229,0.15); }
.code-box.filled { border-color: var(--blue); background: var(--blue-50); }

/* ---------- Checkout ---------- */
.checkout-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 32px; align-items: start; }
.summary { padding: 24px; }
.summary-title { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.8px; color: var(--gray-400); margin-bottom: 16px; }
.summary-plan { display: flex; align-items: center; justify-content: space-between; padding-bottom: 16px; border-bottom: 1px solid var(--divider); }
.summary-plan .sp-name { font-size: 16px; font-weight: 700; color: var(--ink); }
.summary-plan .sp-billing { font-size: 12px; color: var(--gray-500); margin-top: 2px; }
.summary-plan .sp-unit { text-align: right; font-size: 13px; color: var(--gray-500); }
.summary-plan .sp-unit b { color: var(--ink); }

/* What the plan includes */
.summary-incl { padding: 14px 0; border-bottom: 1px solid var(--divider); display: flex; flex-direction: column; gap: 8px; }
.summary-incl .incl-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-700); }
.summary-incl .incl-tick { color: var(--success); font-weight: 800; flex-shrink: 0; }

/* Add-ons picker */
.addons-pick { padding: 16px 0 6px; border-bottom: 1px solid var(--divider); }
.addons-pick-title { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.8px; color: var(--gray-400); margin-bottom: 8px; }
.addon-line { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--divider); }
.addon-line:last-child { border-bottom: none; }
.addon-line.check { cursor: pointer; }
.addon-line .al-label { font-size: 13px; font-weight: 600; color: var(--ink); }
.addon-line .al-sub { font-size: 11px; color: var(--gray-400); margin-top: 1px; }
.addon-line input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--blue); cursor: pointer; }

.summary-line .sl-hint { color: var(--gray-400); font-weight: 500; }

.stepper { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.stepper button {
  width: 34px; height: 34px; border: none; background: #fff; cursor: pointer;
  font-size: 18px; color: var(--gray-500); display: grid; place-items: center;
}
.stepper button:hover { background: var(--bg-muted); color: var(--ink); }
.stepper button[disabled] { opacity: 0.4; cursor: not-allowed; }
.stepper .count { width: 44px; text-align: center; font-size: 14px; font-weight: 700; color: var(--ink); border-left: 1px solid var(--border); border-right: 1px solid var(--border); height: 34px; line-height: 34px; }

.summary-line { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; font-size: 13px; color: var(--gray-500); }
.summary-line.discount { color: var(--success); }
.summary-total { display: flex; align-items: baseline; justify-content: space-between; padding-top: 14px; margin-top: 6px; border-top: 1px solid var(--border); }
.summary-total .st-label { font-size: 14px; font-weight: 700; color: var(--ink); }
.summary-total .st-amount { font-size: 24px; font-weight: 800; color: var(--ink); letter-spacing: -0.5px; }
.summary-total .st-cycle { font-size: 12px; color: var(--gray-400); font-weight: 500; }

/* ---------- Stripe Card Element mock ---------- */
.pay-card { padding: 28px; }
.pay-card-title { font-size: 16px; font-weight: 700; color: var(--ink); margin-bottom: 18px; }
.stripe-label { display: block; font-size: 12px; font-weight: 600; color: var(--ink-700); margin-bottom: 7px; }

/* The single-line Card Element container */
.stripe-card {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid #e0e3e9; border-radius: 7px;
  padding: 0 12px; height: 44px; position: relative;
  box-shadow: 0 1px 1px rgba(0,0,0,0.03);
  transition: border-color 0.12s, box-shadow 0.12s;
  cursor: text;
}
.stripe-card.is-focused { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue), 0 1px 3px rgba(63,132,229,0.2); }
.stripe-card.is-invalid { border-color: #df1b41; }
.stripe-card.is-invalid.is-focused { box-shadow: 0 0 0 1px #df1b41; }

/* brand icon slot */
.stripe-brand { width: 26px; height: 18px; flex-shrink: 0; display: grid; place-items: center; }
.stripe-brand svg { width: 26px; height: 18px; display: block; }

/* The inputs inside — borderless, blend into the single field */
.stripe-field {
  border: none; outline: none; background: transparent;
  font-family: 'Montserrat', -apple-system, sans-serif; font-size: 14.5px;
  color: #30313d; letter-spacing: 0.2px; padding: 0;
}
.stripe-field::placeholder { color: #a3acb9; letter-spacing: normal; }
.sf-number { flex: 1 1 auto; min-width: 80px; }
.sf-exp { width: 58px; flex: 0 0 auto; text-align: left; }
.sf-cvc { width: 44px; flex: 0 0 auto; text-align: left; }
.sf-zip { width: 64px; flex: 0 0 auto; text-align: left; }

.stripe-error { font-size: 12px; color: #df1b41; margin-top: 8px; min-height: 16px; display: flex; align-items: center; gap: 6px; }
.stripe-error svg { width: 14px; height: 14px; flex-shrink: 0; }

.testmode-note {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; color: #9a6700; background: #fff7e0; border: 1px solid #f5e3a8;
  border-radius: 6px; padding: 5px 10px; margin-top: 14px;
}

.pay-secure { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 11px; color: var(--gray-400); margin-top: 14px; }
.pay-secure svg { width: 13px; height: 13px; }

/* ---------- 3DS modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(20,28,46,0.55);
  display: none; align-items: center; justify-content: center; z-index: 200;
  padding: 24px; backdrop-filter: blur(2px);
}
.modal-overlay.open { display: flex; }
.threeds {
  width: 380px; max-width: 100%; background: #fff; border-radius: 12px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,0.3); animation: pop 0.18s ease;
}
@keyframes pop { from { transform: translateY(8px) scale(0.98); opacity: 0; } to { transform: none; opacity: 1; } }
.threeds-bank {
  background: #0b2a4a; color: #fff; padding: 16px 22px;
  display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700;
}
.threeds-bank .bank-mark { width: 26px; height: 26px; border-radius: 6px; background: rgba(255,255,255,0.16); display: grid; place-items: center; font-size: 14px; }
.threeds-body { padding: 28px 26px 26px; text-align: center; }
.threeds-body h3 { font-size: 16px; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.threeds-body p { font-size: 13px; color: var(--gray-500); line-height: 1.55; }
.threeds-amount { font-size: 13px; color: var(--ink-700); margin: 14px 0; }
.threeds-amount b { font-weight: 700; }
.spinner {
  width: 38px; height: 38px; border-radius: 50%;
  border: 3px solid #e6ebf3; border-top-color: var(--blue);
  animation: spin 0.8s linear infinite; margin: 18px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
.threeds-actions { margin-top: 20px; }
.threeds-lock { font-size: 11px; color: var(--gray-400); margin-top: 16px; display: flex; align-items: center; justify-content: center; gap: 6px; }

/* ---------- Success ---------- */
.success-check {
  width: 72px; height: 72px; border-radius: 50%; background: #e7f7ee;
  display: grid; place-items: center; margin: 0 auto 20px; animation: pop 0.25s ease;
}
.success-check svg { width: 36px; height: 36px; }
.receipt { padding: 22px 24px; text-align: left; margin: 28px 0; }
.receipt-row { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; font-size: 13px; border-bottom: 1px solid var(--divider); }
.receipt-row:last-child { border-bottom: none; }
.receipt-row .rl { color: var(--gray-500); }
.receipt-row .rv { color: var(--ink); font-weight: 600; }
.receipt-row.total .rl, .receipt-row.total .rv { font-weight: 800; color: var(--ink); }

/* ---------- Contact sales modal ---------- */
.modal-card { width: 440px; max-width: 100%; background: #fff; border-radius: 12px; box-shadow: 0 24px 60px rgba(0,0,0,0.3); padding: 28px; animation: pop 0.18s ease; }
.modal-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.modal-card p.sub { font-size: 13px; color: var(--gray-500); margin-bottom: 18px; }
.modal-close { position: absolute; top: 16px; right: 18px; background: none; border: none; font-size: 22px; color: var(--gray-400); cursor: pointer; line-height: 1; }
.modal-card { position: relative; }

/* Strength meter for password */
.strength-meter { display: flex; gap: 4px; margin-top: 8px; }
.strength-seg { flex: 1; height: 4px; border-radius: 2px; background: var(--border); transition: background 0.2s; }
.strength-text { font-size: 11px; margin-top: 6px; font-weight: 600; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .plans-grid { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; }
  .checkout-grid { grid-template-columns: 1fr; }
  .h1 { font-size: 28px; }
}
