/* /buy/: Stripe Checkout's hosted-page layout (summary left, form right; compact summary on phones),
   in the site's dark theme, font stack and tokens. The form itself is Paddle's inline checkout. */
:root {
  --bg: #0e0f11;
  --panel: #141518;
  --text: #f5f5f7;
  --text-2: rgba(235, 235, 245, 0.62);
  --text-3: rgba(235, 235, 245, 0.38);
  --line: rgba(255, 255, 255, 0.08);
  --accent: #0a84ff;
  --font: "SF Pro", -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", system-ui, sans-serif;
  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); color-scheme: dark; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 14px; line-height: 20px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
p, dl, dd { margin: 0; }
[hidden] { display: none !important; }

.sf { display: inline-block; vertical-align: middle; flex: none; height: var(--sz, 16px); background: currentColor; -webkit-mask: var(--src) center / contain no-repeat; mask: var(--src) center / contain no-repeat; }
.sf-macbook { --src: url("../assets/sf/macbook.png"); aspect-ratio: 107 / 60; }
.sf-offline { --src: url("../assets/sf/offline.png"); aspect-ratio: 170 / 156; }
.sf-updates { --src: url("../assets/sf/updates.png"); aspect-ratio: 78 / 73; }
.sf-shield { --src: url("../assets/sf/shield.png"); aspect-ratio: 136 / 144; }

/* ---------- Layout: two halves; the summary half is tinted and casts a soft shadow onto the form half ---------- */
.co { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; }
.co-summary { position: relative; z-index: 1; display: flex; justify-content: flex-end; background: var(--panel); box-shadow: 15px 0 30px rgba(0, 0, 0, 0.28); }
.co-summary__inner { display: flex; flex-direction: column; width: 380px; max-width: 100%; padding: 64px 0 48px; margin-right: 80px; margin-left: 32px; }
.co-pay { display: flex; justify-content: flex-start; }
.co-pay__inner { display: flex; flex-direction: column; width: 420px; max-width: 100%; padding: 56px 0 48px; margin-left: 80px; margin-right: 32px; }

/* ---------- Header: back arrow, icon, name ---------- */
.co-back { display: inline-flex; align-items: center; gap: 10px; height: 28px; font-size: 14px; font-weight: 500; color: var(--text); }
.co-back svg { color: var(--text-3); transition: transform 0.2s var(--ease-out), color 0.2s; }
.co-back img { width: 28px; height: 28px; }
.co-back:hover svg { color: var(--text); transform: translateX(-2px); }

/* ---------- Overview: who you pay, the big total ---------- */
.co-overview { margin-top: 32px; }
.co-overview__label { font-size: 16px; line-height: 24px; font-weight: 500; color: var(--text-2); }
.co-overview__amount { display: flex; align-items: baseline; gap: 12px; margin-top: 2px; font-size: 36px; line-height: 44px; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.co-launch { margin-top: 6px; font-size: 14px; color: var(--text-2); }
.co-launch b { font-weight: 600; color: #3d9bff; }

/* ---------- Line item and totals ---------- */
.co-lines { margin-top: 32px; }
.co-item { display: flex; align-items: flex-start; gap: 16px; }
.co-item__img { flex: none; width: 42px; height: 42px; border-radius: 9px; }
.co-item__text { flex: 1; min-width: 0; padding-top: 1px; }
.co-item__name { font-size: 14px; font-weight: 500; }
.co-item__desc { margin-top: 2px; font-size: 12px; line-height: 16px; color: var(--text-3); }
.co-item__price { padding-top: 1px; font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums; }

.co-totals { margin: 24px 0 0 58px; border-top: 1px solid var(--line); }
.co-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 12px 0; font-size: 14px; }
.co-row + .co-row { border-top: 1px solid transparent; }
.co-row dt { font-weight: 500; color: var(--text); }
.co-row dd { font-weight: 500; font-variant-numeric: tabular-nums; }
.co-row__hint { display: block; margin-top: 1px; font-size: 12px; line-height: 16px; font-weight: 400; color: var(--text-3); }
.co-row--discount dd { color: var(--text-2); }
.co-chip { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 6px; font-size: 13px; font-weight: 500; color: var(--text); background: rgba(255, 255, 255, 0.08); }
.co-row--total { margin-top: 4px; padding-top: 16px; border-top: 1px solid var(--line) !important; font-size: 16px; }
.co-row--total dt, .co-row--total dd { font-weight: 600; }

.co-trust { list-style: none; display: grid; gap: 10px; margin: 28px 0 0 58px; padding: 20px 0 0; border-top: 1px solid var(--line); }
.co-trust li { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-2); }
.co-trust .sf { --sz: 14px; width: 18px; color: var(--text-3); }
.co-trust .sf-macbook { --sz: 10px; }

/* ---------- Footer: quiet links at the bottom of the summary (form column on phones) ---------- */
.co-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: auto; padding-top: 48px; font-size: 12px; line-height: 16px; color: var(--text-3); }
.co-foot b { font-weight: 600; color: var(--text-2); }
.co-foot nav { display: flex; gap: 12px; padding-left: 12px; border-left: 1px solid var(--line); }
.co-foot a:hover { color: var(--text); }
.co-foot--pay { display: none; }

/* ---------- Payment column ---------- */
.co-frame-wrap { position: relative; min-height: 450px; }
.co-checkout { position: relative; z-index: 1; opacity: 0; transition: opacity 0.4s var(--ease-out); }
.is-loaded .co-checkout { opacity: 1; }
.co-form-skel { position: absolute; inset: 8px 0 auto 0; display: flex; flex-direction: column; transition: opacity 0.3s; }
.is-loaded .co-form-skel, [data-state="fallback"] .co-form-skel { opacity: 0; pointer-events: none; }

.co-fallback { position: relative; z-index: 2; padding: 32px 0; text-align: center; color: var(--text-2); }
.co-btn { height: 48px; margin: 16px 0; padding: 0 24px; border: 0; border-radius: 999px; font-size: 16px; font-weight: 600; color: #fff; background: linear-gradient(180deg, #1a8bff, #0a7cff 60%, #0a74f0); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 8px 22px -12px rgba(10, 132, 255, 0.45); cursor: pointer; }
.co-btn:active { transform: scale(0.97); }
.co-fallback__fine { font-size: 13px; color: var(--text-3); }
.co-fallback__fine a { color: #3d9bff; }

/* ---------- Skeletons ---------- */
.co-skel { display: inline-block; width: 64px; height: 12px; border-radius: 6px; vertical-align: middle; background: linear-gradient(90deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.05)) 0 0 / 200% 100%; animation: co-shimmer 1.4s linear infinite; }
.co-skel--price { width: 132px; height: 30px; border-radius: 8px; }
.co-form-skel .co-skel { display: block; }
.co-skel--label { width: 96px; height: 10px; margin: 6px 0 10px; }
.co-skel--field { width: 100%; height: 44px; border-radius: 10px; margin-bottom: 20px; }
.co-skel--tall { height: 96px; }
.co-skel--button { width: 100%; height: 48px; border-radius: 999px; margin-top: 8px; }
@keyframes co-shimmer { to { background-position: -200% 0; } }

/* ---------- Phones: Stripe's compact summary with Details ---------- */
.co-mini { display: none; }
@media (max-width: 991px) {
  .co { grid-template-columns: minmax(0, 1fr); }
  .co-summary { justify-content: center; box-shadow: none; border-bottom: 1px solid var(--line); }
  .co-summary__inner { width: min(480px, 100% - 32px); margin: 0; padding: 16px 0 24px; }
  .co-pay { justify-content: center; }
  .co-pay__inner { width: min(480px, 100% - 32px); margin: 0; padding: 24px 0 40px; }
  .co-overview, .co-foot--summary { display: none; }
  .co-foot--pay { display: flex; justify-content: center; padding-top: 32px; }

  .co-mini { display: flex; flex-direction: column; align-items: center; margin-top: 20px; text-align: center; }
  .co-mini img { width: 56px; height: 56px; }
  .co-mini__name { margin-top: 12px; font-size: 16px; line-height: 24px; font-weight: 500; color: var(--text-2); }
  .co-mini__price { margin-top: 2px; font-size: 36px; line-height: 44px; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
  .co-mini .co-launch { margin-top: 4px; }
  .co-mini__toggle { display: inline-flex; align-items: center; gap: 6px; height: 30px; margin-top: 12px; padding: 0 12px; border: 0; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--text); background: rgba(255, 255, 255, 0.08); cursor: pointer; }
  .co-mini__toggle svg { transition: transform 0.25s var(--ease-out); }
  .is-details .co-mini__toggle svg { transform: rotate(180deg); }

  .co-lines { display: none; margin-top: 24px; }
  .is-details .co-lines { display: block; animation: co-drop 0.3s var(--ease-out); }
  .co-totals, .co-trust { margin-left: 0; }
  @keyframes co-drop { from { opacity: 0; transform: translateY(-6px); } }
}
@media (max-width: 360px) {
  .co-pay__inner { width: calc(100% - 16px); }
}

@media (prefers-reduced-motion: reduce) {
  .co-skel { animation: none; }
  .co-checkout, .co-form-skel, .co-back svg, .co-mini__toggle svg { transition: none; }
  .is-details .co-lines { animation: none; }
}
