@font-face {
  font-family: "Geist";
  src: url("/assets/geist-latin-v2.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --background: #f7f7f8;
  --card: #ffffff;
  --foreground: #18181b;
  --muted: #71717a;
  --muted-soft: #a1a1aa;
  --border: #e4e4e7;
  --border-strong: #a1a1aa;
  --selected: #f0f7f3;
  --accent: #0b8f56;
  --accent-soft: #e8f7ef;
  --alpina-blue: #36a8ff;
  --alpina-lime: #9af20d;
  --destructive: #dc2626;
  --ring: rgba(24, 24, 27, .12);
  --shadow: 0 1px 2px rgba(0, 0, 0, .03), 0 8px 24px rgba(0, 0, 0, .04);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --background: #09090b;
  --card: #111113;
  --foreground: #fafafa;
  --muted: #a1a1aa;
  --muted-soft: #71717a;
  --border: #27272a;
  --border-strong: #52525b;
  --selected: #12251b;
  --accent: #4ade80;
  --accent-soft: #10291b;
  --ring: rgba(250, 250, 250, .12);
  --shadow: 0 12px 34px rgba(0, 0, 0, .28);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--background); scroll-behavior: smooth; }
body { min-height: 100vh; margin: 0; background: var(--background); color: var(--foreground); font-family: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 15px; letter-spacing: 0; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; letter-spacing: 0; }
a { color: inherit; }

.topbar { height: 58px; padding: 0 max(20px, env(safe-area-inset-left)); border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--background) 92%, transparent); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(14px); }
.topbar-content { width: min(980px, 100%); height: 100%; margin: 0 auto; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--foreground); font-size: 16px; font-weight: 700; text-decoration: none; }
.brand img { width: 28px; height: 28px; object-fit: contain; }
.primary-nav { padding: 3px; border: 1px solid var(--border); border-radius: 10px; background: color-mix(in srgb, var(--card) 75%, transparent); display: flex; align-items: center; gap: 2px; }
.primary-nav a { min-height: 28px; padding: 6px 10px; border-radius: 6px; color: var(--muted); display: inline-flex; align-items: center; font-size: 12px; font-weight: 550; text-decoration: none; white-space: nowrap; }
.primary-nav a:hover { color: var(--foreground); }
.primary-nav a.active { background: var(--card); color: var(--foreground); box-shadow: 0 1px 3px rgba(0, 0, 0, .07); }
.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.support-button, .icon-button { height: 34px; border: 1px solid var(--border); border-radius: 9px; background: var(--card); color: var(--foreground); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 1px 2px rgba(0, 0, 0, .03); }
.support-button { padding: 0 11px; gap: 7px; font-size: 13px; font-weight: 550; text-decoration: none; }
.icon-button { width: 34px; padding: 0; }
.support-button:hover, .icon-button:hover { background: color-mix(in srgb, var(--card) 82%, var(--foreground) 4%); }
.support-button img, .icon-button img { width: 16px; height: 16px; }
html[data-theme="dark"] .support-button img, html[data-theme="dark"] .icon-button img, html[data-theme="dark"] .email-field img, html[data-theme="dark"] .payment-caption img, html[data-theme="dark"] .about-points img, html[data-theme="dark"] .access-summary img { filter: invert(1); }

main { width: min(500px, calc(100% - 32px)); margin: 0 auto; padding: 34px 0 24px; }
.about-hero { min-height: 460px; padding: 62px 0 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; position: relative; }
.about-hero::before { content: ""; width: 76px; height: 3px; margin-bottom: 19px; border-radius: 999px; background: linear-gradient(90deg, var(--alpina-blue), var(--alpina-lime)); box-shadow: 0 5px 18px color-mix(in srgb, var(--alpina-blue) 18%, transparent); }
.product-mark { padding: 6px 10px 6px 7px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 650; box-shadow: 0 1px 2px rgba(0, 0, 0, .03); }
.product-mark img { width: 23px; height: 23px; object-fit: contain; }
.about-hero h1 { margin: 16px 0 13px; font-size: 42px; line-height: 1.04; font-weight: 720; }
.about-hero > p { max-width: 470px; margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
.about-points { margin-top: 23px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.about-points span { min-height: 34px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 9px; background: var(--card); color: var(--muted); display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 560; }
.about-points img { width: 15px; height: 15px; }
.hero-button { min-width: 174px; height: 44px; margin-top: 26px; padding: 0 15px; border-radius: 10px; background: var(--foreground); color: var(--background); display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; font-weight: 650; text-decoration: none; box-shadow: var(--shadow); }
.hero-button img { width: 16px; height: 16px; filter: invert(1); }
html[data-theme="dark"] .hero-button img { filter: none; }
.intro { margin: 0 0 26px; padding-top: 74px; text-align: center; scroll-margin-top: 52px; }
.intro h1 { margin: 0; font-size: 30px; line-height: 1.16; font-weight: 700; }
.intro p { margin: 8px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }

#checkout-form { display: grid; gap: 22px; }
.form-section { display: grid; gap: 10px; }
.section-heading { display: flex; align-items: center; gap: 10px; }
.step { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; background: var(--foreground); color: var(--background); font-size: 12px; font-weight: 700; }
.section-heading h2 { margin: 0; font-size: 15px; line-height: 1.3; font-weight: 650; }

.email-field { height: 50px; padding: 0 14px; border: 1px solid var(--border); border-radius: 11px; background: var(--card); display: flex; align-items: center; gap: 11px; box-shadow: 0 1px 2px rgba(0, 0, 0, .02); transition: border-color .16s ease, box-shadow .16s ease; }
.email-field:focus-within { border-color: var(--foreground); box-shadow: 0 0 0 3px var(--ring); }
.email-field img { width: 18px; height: 18px; opacity: .62; }
.email-field input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--foreground); font-size: 16px; }
.email-field input::placeholder { color: var(--muted-soft); }
.field-hint { margin: -1px 1px 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.field-error, .submit-error { min-height: 17px; margin: -5px 1px 0; color: var(--destructive); font-size: 12px; }

.plan-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.plan-card { min-width: 0; min-height: 108px; padding: 14px; border: 1px solid var(--border); border-radius: 11px; background: var(--card); cursor: pointer; position: relative; display: flex; flex-direction: column; box-shadow: 0 1px 2px rgba(0, 0, 0, .02); transition: border-color .16s ease, background .16s ease, box-shadow .16s ease; }
.plan-card:hover { border-color: var(--border-strong); }
.plan-card.selected { border-color: var(--foreground); background: var(--card); box-shadow: 0 0 0 1px var(--foreground), 0 8px 20px rgba(0, 0, 0, .05); }
.plan-card input { position: absolute; opacity: 0; pointer-events: none; }
.plan-check { width: 18px; height: 18px; border: 1.5px solid var(--border-strong); border-radius: 50%; position: absolute; top: 14px; right: 14px; }
.plan-card.selected .plan-check { border-color: var(--foreground); background: var(--foreground); }
.plan-card.selected .plan-check::after { content: "✓"; position: absolute; inset: 0; color: var(--background); display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.plan-period { padding-right: 28px; color: var(--muted); font-size: 13px; font-weight: 520; }
.plan-card strong { margin-top: auto; font-size: 22px; line-height: 1; font-weight: 680; }
.plan-note { margin-top: 6px; color: var(--muted); font-size: 11px; line-height: 1.25; }
.saving { position: absolute; right: 12px; bottom: 11px; padding: 4px 8px; border: 1px solid rgba(120, 126, 135, .35); border-radius: 999px; background: linear-gradient(115deg, #ffffff 0%, #cfd4dc 18%, #ffffff 36%, #9ea6b2 56%, #f8fafc 76%, #c8ced7 100%); color: #24272b; font-size: 10px; font-weight: 760; box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 2px 6px rgba(31, 41, 55, .12); transform: rotate(-2deg); }
.saving.best { background: linear-gradient(115deg, #fafafa 0%, #aeb6c2 18%, #ffffff 37%, #8f98a6 58%, #f8fafc 77%, #bcc3cd 100%); color: #15171a; }
.renewal-note { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.renewal-note.hidden { display: none; }

.access-summary { padding: 14px; border: 1px solid var(--border); border-radius: 11px; background: linear-gradient(110deg, color-mix(in srgb, var(--alpina-blue) 5%, var(--card)), var(--card) 42%, color-mix(in srgb, var(--alpina-lime) 6%, var(--card))); display: grid; grid-template-columns: 36px 1fr; gap: 11px; align-items: center; box-shadow: inset 3px 0 0 color-mix(in srgb, var(--alpina-blue) 64%, var(--alpina-lime)); }
.access-icon { width: 36px; height: 36px; border-radius: 7px; background: var(--accent-soft); display: grid; place-items: center; }
.access-icon img { width: 18px; height: 18px; }
.access-summary p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.access-summary strong { margin-bottom: 2px; color: var(--foreground); display: block; font-size: 13px; font-weight: 650; }
.access-summary p > span { display: block; }
#delivery-copy { transition: color .2s ease, opacity .2s ease; }
#delivery-copy.delivery-updated { color: var(--foreground); animation: delivery-in .28s ease both; }

.checkout-bar { display: grid; gap: 10px; margin-top: 0; }
.checkout-bar > div { display: flex; align-items: end; justify-content: space-between; padding: 0 1px; }
.checkout-bar > div span { color: var(--muted); font-size: 13px; }
.checkout-bar > div strong { font-size: 25px; line-height: 1; font-weight: 680; }
.checkout-bar button, .dashboard-button, .secondary-button { width: 100%; height: 50px; padding: 0 16px; border: 0; border-radius: 11px; background: var(--foreground); color: var(--background); font-weight: 650; display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; text-decoration: none; box-shadow: var(--shadow); transition: opacity .16s ease, transform .16s ease; }
.checkout-bar button:hover, .dashboard-button:hover { opacity: .9; }
.checkout-bar button:active, .dashboard-button:active { transform: translateY(1px); }
.checkout-bar button img { width: 17px; height: 17px; filter: invert(1); }
html[data-theme="dark"] .checkout-bar button img { filter: none; }
.checkout-bar button:disabled { cursor: wait; opacity: .64; }
.checkout-bar button.loading img { animation: spin .9s linear infinite; content: url('/assets/loader-circle.svg'); }
.payment-caption { margin: -19px 0 0; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 11px; }
.payment-caption img { width: 14px; height: 14px; opacity: .55; }
.legal-note { margin: -15px 10px 0; color: var(--muted); text-align: center; font-size: 10px; line-height: 1.5; }
.legal-note a { text-underline-offset: 2px; }

.inline-status, .status-panel { padding: 32px 26px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); text-align: center; box-shadow: var(--shadow); }
.inline-status h2 { margin: 15px 0 7px; font-size: 22px; line-height: 1.25; }
.inline-status p, .status-panel p { margin: 0 auto 20px; max-width: 390px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.secondary-button { height: 44px; margin-top: 5px; border: 1px solid var(--border); background: var(--card); color: var(--foreground); box-shadow: none; }

footer { width: min(500px, calc(100% - 32px)); min-height: 82px; margin: 22px auto 0; padding: 22px 0; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; color: var(--muted); font-size: 11px; }
footer a { text-decoration: none; }

.complete-page { display: flex; flex-direction: column; }
.complete-main { flex: 1; display: grid; place-items: center; padding-top: 28px; }
.status-panel { width: min(460px, 100%); }
.status-panel h1 { margin: 15px 0 7px; font-size: 27px; line-height: 1.2; }
.status-icon { width: 44px; height: 44px; margin: 0 auto; border-radius: 50%; background: var(--accent-soft); display: grid; place-items: center; }
.status-icon.loading span { width: 20px; height: 20px; border: 2px solid color-mix(in srgb, var(--accent) 24%, transparent); border-top-color: var(--accent); border-radius: 50%; animation: spin .9s linear infinite; }
.status-icon.success::after { content: "✓"; color: var(--accent); font-size: 23px; font-weight: 800; }
.status-icon.error::after { content: "!"; color: var(--destructive); font-size: 23px; font-weight: 800; }
.retry-button { width: 100%; height: 44px; margin-top: 8px; border: 1px solid var(--border); border-radius: 8px; background: transparent; color: var(--foreground); font-weight: 600; cursor: pointer; }
.hidden { display: none !important; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes delivery-in { from { opacity: .45; transform: translateY(2px); } to { opacity: 1; transform: translateY(0); } }
body > canvas { position: fixed !important; inset: 0 !important; z-index: 1000 !important; pointer-events: none !important; }

@media (max-width: 540px) {
  .topbar { height: 56px; padding-inline: 14px; }
  .topbar-content { grid-template-columns: auto 1fr auto; gap: 7px; }
  .brand span, .support-button { display: none; }
  .primary-nav { justify-self: center; }
  .primary-nav a { padding-inline: 7px; font-size: 11px; }
  main { width: min(100% - 40px, 500px); padding-top: 28px; }
  .about-hero { min-height: 430px; padding: 45px 0 44px; }
  .about-hero h1 { font-size: 36px; }
  .about-hero > p { font-size: 14px; }
  .intro { padding-top: 58px; }
  .intro { margin-bottom: 29px; }
  .intro h1 { font-size: 27px; }
  .intro p { font-size: 13px; }
  #checkout-form { gap: 20px; }
  .plan-card { min-height: 108px; padding: 13px; }
  .plan-check { top: 12px; right: 12px; }
  .saving { right: 10px; bottom: 10px; }
  .plan-card strong { font-size: 22px; }
  .inline-status, .status-panel { padding: 28px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}
