/* =========================================================================
   Evermail — Auth + Onboarding styles
   Layered on top of colors_and_type.css. Uses marketing tokens (--mkt-*)
   so the chrome matches the marketing site 1:1:
     - same <nav class="nav"> look: sticky, blurred, infinity-logo, beta pill
     - same btn-primary (blue) / btn-sm rhythm
     - same footer shell
     - h1 scale and tracking from the hero section

   Class names still mirror the Blazor source:
     .auth-wrapper  .auth-grid  .auth-hero-card  .auth-pill  .auth-highlights
     .auth-card  .auth-social  .social-btn  .auth-divider  .auth-form
     .form-field  .form-field-grid  .modern-input  .auth-primary-button
     .auth-footer  .auth-link  .terms-acceptance
     .onboarding-wrapper  .page-hero  .onboarding-timeline  .timeline-node
     .wizard-stage  .plan-grid  .plan-card  .security-choice-grid
     .security-choice  .billing-summary-card  .billing-toggle
     .upload-checklist  .wizard-stage__footer
   ========================================================================= */

/* Per-artboard dark mode: duplicate the :root dark tokens onto any
   [data-theme="dark"] node so design-canvas artboards can theme themselves. */
[data-theme='dark'] {
  --color-brand-primary: #7ab8ff;
  --color-brand-primary-strong: #a5cdff;
  --color-brand-accent: #5de1d6;
  --color-app-bg: #020617;
  --color-surface: #0b1120;
  --color-surface-muted: #111827;
  --color-surface-raised: #131c2f;
  --color-border: #1f2937;
  --color-border-strong: #334155;
  --color-text-primary: #f8fafc;
  --color-text-secondary: #94a3b8;
  --color-text-muted: #64748b;

  --mkt-blue: #3b82f6;
  --mkt-blue-hover: #60a5fa;
  --mkt-teal: #5de1d6;
  --mkt-teal-soft: #7df0e4;
  --mkt-navy: #3b6a93;
  --mkt-gradient: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
  --mkt-gradient-infinity: linear-gradient(90deg, #3b6a93 0%, #5de1d6 100%);
  --mkt-surface: #05070d;
  --mkt-surface-band-1: #0d131e;
  --mkt-surface-band-2: #141a26;
  --mkt-surface-dark: #05070d;
  --mkt-rule: rgba(148, 163, 184, 0.14);
  --mkt-text-strong: #f1f5f9;
  --mkt-text: #e2e8f0;
  --mkt-text-muted: #94a3b8;
  --mkt-text-faint: #64748b;
  --mkt-accent-tint: rgba(59, 130, 246, 0.10);
  --mkt-accent-ring: rgba(59, 130, 246, 0.28);
  --mkt-accent-tint-strong: rgba(59, 130, 246, 0.22);
}

:root {
  --em-blue:       var(--mkt-blue);
  --em-blue-hov:   var(--mkt-blue-hover);
  /* Theme-aware aliases — these MUST flip in dark mode, so map to --mkt-text-*,
     not --mkt-ink (which is a hardcoded light-mode-only color). */
  --em-navy:       var(--mkt-text-strong);
  --em-navy-deep:  var(--mkt-text-strong);
  --em-ink:        var(--mkt-text-strong);
  --em-teal:       var(--mkt-teal);
  --em-teal-soft:  var(--mkt-teal-soft);
  --em-grad:       var(--mkt-gradient);
  --em-grad-infinity: var(--mkt-gradient-infinity);

  /* Brand blue stays the brand accent for eyebrows, pills, links */
  --em-accent:     var(--mkt-blue);

  --page-bg:       var(--mkt-surface);
  --panel-muted:   var(--mkt-surface-band-1);
  --panel-muted-2: var(--mkt-surface-band-2);
  --rule:          var(--mkt-rule);
  --text:          var(--mkt-text);
  --text-strong:   var(--mkt-text-strong);
  --text-muted:    var(--mkt-text-muted);
  --accent-tint:   var(--mkt-accent-tint);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--page-bg); color: var(--text); font-family: var(--font-family-base); }

/* ---------- Shared frame ---------- */
.auth-frame,
.onboarding-frame {
  width: 100%;
  min-height: 100%;
  background: var(--page-bg);
  display: flex;
  flex-direction: column;
}

/* ============================================================
   Marketing-site NAV (1:1 with ui_kits/marketing/index.html)
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--page-bg) 85%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, background .2s;
}
.nav.is-stuck { border-bottom-color: var(--rule); }
.nav__inner {
  max-width: 1120px; margin: 0 auto; padding: 1.1rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
}
.nav__brand { display: flex; align-items: center; gap: .55rem; font-weight: 700; font-size: 1.12rem; letter-spacing: -0.015em; color: var(--text-strong); }
.nav__brand img { width: 28px; height: auto; display: block; }
.nav__wordmark { color: var(--text-strong); }
.nav__beta {
  margin-left: .65rem;
  font-size: .68rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  padding: .2rem .55rem; border-radius: 999px;
  background: var(--accent-tint); color: var(--em-accent);
}
.nav__links { display: flex; gap: 2rem; font-size: .9rem; }
.nav__links a {
  color: var(--text-muted); cursor: pointer;
  transition: color .15s; text-decoration: none;
}
.nav__links a:hover { color: var(--em-accent); }
.nav__cta { display: flex; gap: 1.25rem; align-items: center; }
.nav__cta a { cursor: pointer; text-decoration: none; }
.nav__login {
  font-size: .9rem; font-weight: 500; color: var(--text-muted);
  transition: color .15s;
}
.nav__login:hover { color: var(--text-strong); }
.nav__links a, .nav__login, .nav__start { white-space: nowrap; }
.nav__theme {
  width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--rule); background: transparent; color: var(--text-muted);
  border-radius: 999px; cursor: pointer; padding: 0; font-size: .88rem;
  transition: color .15s, border-color .15s, background .15s;
}
.nav__theme:hover { color: var(--text-strong); border-color: var(--em-navy); }
@media (max-width: 880px) { .nav__links { display: none; } }

/* ============================================================
   Airy hero layout (Login / Register)
   Single centered column, no hero card. Breathes like marketing.
   ============================================================ */
.auth-airy {
  flex: 1;
  width: 100%;
  padding: 5rem 1.5rem 6rem;
  display: flex;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.auth-airy::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 45% at 50% 0%, var(--accent-tint) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.auth-airy__inner {
  position: relative; z-index: 1;
  width: 100%; max-width: 460px;
  display: flex; flex-direction: column; align-items: stretch;
  text-align: center;
}
.auth-airy__eyebrow {
  margin: 0 0 .9rem;
  font-size: .72rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
  color: var(--em-accent);
}
.auth-airy__title {
  margin: 0 0 1.25rem;
  font-size: clamp(2rem, 3.6vw, 2.75rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--text-strong);
  text-wrap: balance;
}
.auth-airy__title .accent {
  color: var(--em-accent);
  white-space: nowrap;
}
.auth-airy__lede {
  margin: 0 auto 2.25rem;
  max-width: 44ch;
  font-size: 1rem; line-height: 1.55;
  color: var(--text-muted);
  text-wrap: pretty;
}
.auth-airy__form {
  text-align: left;
  display: flex; flex-direction: column; gap: 1.1rem;
}
.auth-airy__switch {
  margin: 1.75rem 0 0;
  font-size: .92rem; color: var(--text-muted);
}
.auth-airy__trust {
  list-style: none; padding: 0; margin: 2.25rem 0 0;
  display: flex; justify-content: center; flex-wrap: wrap;
  gap: 1.25rem;
  font-size: .82rem; color: var(--text-muted);
}
.auth-airy__trust li { display: inline-flex; align-items: center; gap: .4rem; }
.auth-airy__trust i { color: var(--em-accent); font-size: .95rem; }

/* ============================================================
   Onboarding — Plan picker
   Uses the SAME class vocabulary as marketing's pricing section
   (.pricing-grid, .price, .price__name, .price__tag, .price__amount,
   .price__sub, .price__feats, .is-popular) so the look is 1:1.
   ============================================================ */
.billing-toggle {
  display: inline-flex;
  padding: 4px;
  background: var(--panel-muted);
  border: 1px solid var(--rule);
  border-radius: 999px;
  gap: 2px;
  margin-top: 1.25rem;
}
.billing-toggle--compact { padding: 3px; }
.billing-toggle__option {
  border: 0; background: transparent; cursor: pointer;
  padding: .5rem 1.1rem;
  border-radius: 999px;
  font: inherit; font-size: .88rem; font-weight: 500;
  color: var(--text-muted);
  transition: background .15s, color .15s;
}
.billing-toggle__option:hover { color: var(--text-strong); }
.billing-toggle__option.is-active {
  background: #fff;
  color: var(--text-strong);
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
}
[data-theme='dark'] .billing-toggle__option.is-active { background: var(--mkt-surface-band-2); }

/* ----- Pricing grid (mirrors marketing/index.html .pricing-grid) ----- */
.pricing-grid {
  display: grid; grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin-top: 4.5rem;
  align-items: stretch;
}
@media (max-width: 1080px) { .pricing-grid { grid-template-columns: repeat(2, 1fr) !important; } }
@media (max-width: 600px)  { .pricing-grid { grid-template-columns: 1fr !important; } }

.price {
  padding: 2.25rem 1.5rem;
  border-right: 1px solid var(--rule);
  display: flex; flex-direction: column; gap: .65rem;
  position: relative;
  background: transparent;
  min-width: 0;
}
.price:last-child { border-right: 0; }
@media (max-width: 1080px) {
  .price:nth-child(2n) { border-right: 0; }
  .price { border-bottom: 1px solid var(--rule); }
}
@media (max-width: 600px) { .price { border-right: 0; } }

.price.is-popular {
  background: var(--mkt-surface);
  border: 1px solid var(--em-blue);
  border-radius: 16px;
  margin: -1.75rem -0.5rem;
  padding: 2.5rem 1.6rem 2.25rem;
  box-shadow:
    0 1px 2px rgba(15,23,42,0.04),
    0 20px 40px -18px rgba(37,99,235,0.35),
    0 8px 20px -12px rgba(15,23,42,0.18);
  z-index: 2;
}
.price.is-popular::before {
  content: 'Most popular';
  position: absolute; top: -18px; left: 50%; transform: translateX(-50%);
  font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700;
  color: #fff;
  background: var(--em-blue);
  padding: .4rem .85rem;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 4px 12px -2px rgba(37,99,235,0.45);
  z-index: 3;
}
[data-theme='dark'] .price.is-popular {
  background: color-mix(in srgb, var(--em-blue) 8%, var(--mkt-surface-band-1));
  border-color: var(--mkt-teal);
  box-shadow:
    0 1px 2px rgba(0,0,0,0.3),
    0 20px 40px -18px rgba(93,225,214,0.25),
    0 8px 20px -12px rgba(0,0,0,0.4);
}
[data-theme='dark'] .price.is-popular::before {
  background: var(--mkt-teal);
  color: #0b1220;
  box-shadow: 0 4px 12px -2px rgba(93,225,214,0.4);
}
.price.is-popular .price__amount { font-size: 2.35rem; }
.price.is-popular .price__name   { color: var(--text-strong); font-size: 1.15rem; }
[data-theme='dark'] .price.is-popular .price__name { color: var(--mkt-teal); }
.price.is-popular + .price { border-left: 0; }
.price:has(+ .is-popular) { border-right: 0; }
@media (max-width: 1080px) {
  .price.is-popular { margin: 0; border-radius: 0; border-left: 1px solid var(--em-blue); border-right: 1px solid var(--em-blue); }
  .price.is-popular::before { top: 1rem; left: auto; right: 1rem; transform: none; }
}
@media (max-width: 600px) {
  .price.is-popular { border-radius: 14px; margin: 1rem 0; }
  .price.is-popular::before { top: -14px; left: 50%; right: auto; transform: translateX(-50%); }
}

.price__name   { font-size: 1.05rem; font-weight: 700; color: var(--text-strong); }
.price__tag    { font-size: .82rem; color: var(--text-muted); }
.price__amount { font-size: 2rem; font-weight: 700; letter-spacing: -0.02em; color: var(--text-strong); margin-top: .25rem; }
.price__amount small { font-size: .8rem; font-weight: 500; color: var(--text-muted); }
.price__sub    { font-size: .78rem; color: var(--text-muted); margin-top: -.25rem; }
.price__feats {
  list-style: none; padding: 0; margin: 1rem 0 1.5rem;
  display: flex; flex-direction: column; gap: .55rem;
  font-size: .86rem; color: var(--text);
}
.price__feats li { display: flex; align-items: flex-start; gap: .5rem; line-height: 1.4; }
.price__feats i  { color: var(--em-accent); font-size: .82rem; margin-top: .2rem; flex: none; }
[data-theme='dark'] .price__feats i { color: var(--mkt-teal); }

.price__cta { margin-top: auto; }
.price__cta.is-current { opacity: .85; }

.pricing__yearly { text-align: center; font-size: .85rem; color: var(--text-muted); margin-top: 2rem; }
.pricing__yearly strong { color: var(--mkt-teal); font-weight: 700; }

/* ============================================================
   Buttons (marketing vocabulary)
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  padding: .65rem 1.15rem;
  border-radius: 10px;
  font-family: inherit; font-weight: 500; font-size: .94rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, border-color .15s, color .15s, transform .05s, box-shadow .15s;
  box-sizing: border-box;
  line-height: 1.2;
}
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--em-blue);
  color: #fff;
  box-shadow: var(--mkt-shadow-primary);
}
.btn-primary:hover:not(:disabled) { background: var(--em-blue-hov); }

.btn-outline {
  background: transparent;
  color: var(--text-strong);
  border-color: var(--rule);
}
.btn-outline:hover:not(:disabled) { border-color: var(--em-navy); color: var(--em-navy); }

.btn-outline-primary {
  background: transparent;
  color: var(--em-blue);
  border-color: var(--em-blue);
}
.btn-outline-primary:hover:not(:disabled) { background: var(--accent-tint); }

.btn-outline-secondary {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--rule);
}
.btn-outline-secondary:hover:not(:disabled) { background: var(--panel-muted); color: var(--text-strong); }

.btn-ghost {
  background: transparent;
  color: var(--text-strong);
  border: 1px solid transparent;
}
.btn-ghost:hover:not(:disabled) { background: var(--panel-muted); }

.btn-success {
  background: var(--mkt-teal);
  color: #fff;
}
.btn-success:hover:not(:disabled) { background: color-mix(in srgb, var(--mkt-teal) 80%, black); }

.btn-lg { padding: .85rem 1.4rem; font-size: 1rem; }
.btn-xl { padding: .95rem 1.6rem; font-size: 1.02rem; font-weight: 600; }
.btn-sm { padding: .45rem .85rem; font-size: .84rem; }
.w-100 { width: 100%; }

/* ============================================================
   Auth layout
   ============================================================ */
.home-wrapper.auth-wrapper {
  flex: 1;
  padding: 4.5rem 1.5rem 5rem;
  max-width: 1120px;
  margin: 0 auto;
  width: 100%;
}
.auth-wrapper__eyebrow {
  text-align: center;
  font-size: .78rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--em-accent);
  font-weight: 600;
  margin: 0 0 .75rem;
}
.auth-wrapper__lede {
  text-align: center;
  font-size: 1.02rem; color: var(--text-muted);
  max-width: 52ch; margin: 0 auto 3rem;
  line-height: 1.55;
  text-wrap: pretty;
}

.auth-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 2rem;
  align-items: stretch;
}

/* ---------- Hero card (left) ---------- */
.auth-hero-card {
  border-radius: 20px;
  padding: 2.5rem 2.25rem;
  background: var(--mkt-surface);
  border: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
  overflow: hidden;
}

.auth-hero-card__eyebrow {
  font-size: .72rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--em-accent);
  margin: 0;
}
.auth-hero-card h1 {
  /* matches marketing hero h1 type, one notch down */
  font-size: clamp(2rem, 3.4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.12;
  color: var(--em-navy-deep);
  margin: 0;
  text-wrap: balance;
}
.auth-hero-card h1 .accent {
  background: var(--em-grad-infinity);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.auth-hero-card p.hero-card__lede {
  margin: 0;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
  max-width: 44ch;
  text-wrap: pretty;
}

/* Webapp variant — hard-dark panel (matches marketing .security section).
   This panel is ALWAYS dark, regardless of the page theme. It sits on the
   page's --mkt-surface background; in light mode it gives a dramatic contrast;
   in dark mode we shift it to a lighter navy so it still reads as a distinct panel. */
.auth-hero-card--dark {
  background: var(--mkt-surface-dark);
  border-color: rgba(255,255,255,0.08);
}
[data-theme='dark'] .auth-hero-card--dark {
  /* Page surface is near-black; lift the hero to navy so it's distinguishable */
  background: linear-gradient(180deg, #0f1729 0%, #0a1020 100%);
  border-color: rgba(148,163,184,0.14);
}
.auth-hero-card--dark::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 50% at 85% 15%, rgba(37,99,235,0.22), transparent 70%),
    radial-gradient(50% 55% at 10% 95%, rgba(45,191,169,0.18), transparent 70%);
  pointer-events: none;
}
.auth-hero-card--dark > * { position: relative; z-index: 1; }
.auth-hero-card--dark h1 { color: #fff; }
.auth-hero-card--dark .hero-card__lede { color: #94a3b8; }
.auth-hero-card--dark .auth-hero-card__eyebrow { color: var(--em-teal-soft); }

/* Marketing variant — zebra band surface (light, matches the marketing site). */
.auth-hero-card--marketing {
  background: linear-gradient(180deg, var(--panel-muted) 0%, var(--mkt-surface) 100%);
  border-color: var(--rule);
}
.auth-hero-card--marketing::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(55% 45% at 85% 10%, rgba(37,99,235,0.10), transparent 70%),
    radial-gradient(45% 50% at 10% 95%, rgba(45,191,169,0.08), transparent 70%);
  pointer-events: none;
}
.auth-hero-card--marketing > * { position: relative; z-index: 1; }
.auth-hero-card--marketing .auth-hero-card__eyebrow { color: var(--em-accent); }
[data-theme='dark'] .auth-hero-card--marketing::before {
  background:
    radial-gradient(55% 45% at 85% 10%, rgba(59,130,246,0.18), transparent 70%),
    radial-gradient(45% 50% at 10% 95%, rgba(93,225,214,0.12), transparent 70%);
}

/* Pills (reuse marketing .format-chip feel) */
.auth-pill-group {
  display: flex; flex-wrap: wrap; gap: .45rem;
}
.auth-pill {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .35rem .75rem;
  border-radius: 999px;
  font-size: .78rem; font-weight: 500;
  background: var(--accent-tint);
  color: var(--em-accent);
  border: 1px solid transparent;
  letter-spacing: 0;
}
.auth-hero-card--dark .auth-pill {
  background: rgba(255,255,255,0.06);
  color: #e2e8f0;
  border-color: rgba(255,255,255,0.08);
}
.auth-hero-card--dark .auth-pill strong { color: #fff; }
.auth-pill strong { color: var(--text-strong); font-weight: 600; }

/* Highlights list — mirrors marketing .feat */
.auth-highlights {
  list-style: none;
  padding: 0; margin: .5rem 0 0;
  display: flex; flex-direction: column; gap: 1rem;
}
.auth-highlights li {
  display: flex; align-items: flex-start; gap: .85rem;
  font-size: .96rem; line-height: 1.5;
  color: var(--text);
}
.auth-highlights li i {
  flex-shrink: 0;
  width: 34px; height: 34px;
  border-radius: 9px;
  background: var(--accent-tint);
  color: var(--em-accent);
  display: grid; place-items: center;
  font-size: 1rem;
  margin-top: 1px;
}
.auth-hero-card--dark .auth-highlights li { color: #e2e8f0; }
.auth-hero-card--dark .auth-highlights li i {
  background: rgba(45,191,169,0.15);
  color: var(--em-teal-soft);
}

/* ---------- Auth card (right) ---------- */
.auth-card {
  border-radius: 20px;
  background: var(--mkt-surface);
  border: 1px solid var(--rule);
  padding: 2.5rem 2.25rem;
  box-shadow: var(--shadow-lg, 0 24px 56px -24px rgba(15,23,42,0.14)), 0 4px 12px -6px rgba(15,23,42,0.06);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.auth-card__header h2 {
  margin: 0 0 .35rem;
  font-size: 1.5rem; font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--em-navy-deep);
}
.auth-card__header p {
  margin: 0; font-size: .94rem; line-height: 1.55;
  color: var(--text-muted);
}

/* Terms */
.terms-acceptance { padding: .1rem 0; }
.terms-check {
  display: flex; align-items: flex-start; gap: .6rem;
  font-size: .88rem; color: var(--text-muted);
  line-height: 1.45; cursor: pointer;
}
.terms-check input[type="checkbox"] {
  margin-top: 2px;
  width: 16px; height: 16px;
  accent-color: var(--em-blue);
  cursor: pointer;
}
.terms-check a {
  color: var(--em-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Social buttons */
.auth-social {
  display: flex; flex-direction: column; gap: .625rem;
}
.social-btn {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: .6rem;
  padding: .75rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--rule);
  background: var(--mkt-surface);
  color: var(--text-strong);
  font-size: .94rem; font-weight: 500;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .05s;
  font-family: inherit;
}
.social-btn i { font-size: 1.15rem; display: inline-flex; }
.social-btn:hover:not(:disabled) { background: var(--panel-muted); border-color: var(--em-accent); }
.social-btn:active:not(:disabled) { transform: translateY(1px); }
.social-btn:disabled { opacity: .5; cursor: not-allowed; }
.social-btn--google i { color: #4285F4; }
.social-btn--microsoft i { color: #0078D4; }

/* Divider */
.auth-divider {
  display: flex; align-items: center; gap: .75rem;
  color: var(--text-muted);
  font-size: .8rem;
  margin: .15rem 0;
}
.auth-divider::before,
.auth-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--rule);
}
.auth-divider span { padding: 0 .1rem; letter-spacing: .01em; }

/* Form */
.auth-form {
  display: flex; flex-direction: column; gap: 1rem;
}
.form-field { display: flex; flex-direction: column; gap: .35rem; }
.form-field label {
  font-size: .82rem; font-weight: 500;
  color: var(--em-navy-deep);
  letter-spacing: 0;
}
.form-field small {
  font-size: .78rem; color: var(--text-muted);
  margin-top: .2rem; line-height: 1.4;
}
.form-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
}
.modern-input {
  width: 100%;
  padding: .75rem .9rem;
  border-radius: 12px;
  border: 1px solid var(--rule);
  background: var(--mkt-surface);
  color: var(--text-strong);
  font-size: .96rem;
  transition: border-color .15s, box-shadow .15s;
  font-family: inherit;
}
.modern-input::placeholder { color: var(--text-muted); opacity: .7; }
.modern-input:focus {
  outline: none;
  border-color: var(--em-blue);
  box-shadow: 0 0 0 3px var(--mkt-accent-ring);
}

.auth-primary-button {
  margin-top: .25rem;
}

/* Footer link */
.auth-footer {
  text-align: center;
  font-size: .9rem;
  color: var(--text-muted);
  padding-top: .25rem;
}
.auth-link {
  color: var(--em-blue);
  font-weight: 500;
  text-decoration: none;
}
.auth-link:hover { text-decoration: underline; }

/* Alerts */
.auth-alert {
  border-radius: 12px;
  padding: .75rem .85rem;
  font-size: .9rem;
  margin: 0;
  display: flex; align-items: flex-start; gap: .5rem;
}
.alert-danger  { background: var(--color-danger-bg);     color: #991b1b; border: 1px solid rgba(239,68,68,0.25); }
.alert-success { background: var(--color-success-bg);    color: #065f46; border: 1px solid rgba(16,185,129,0.25); }
.alert-info    { background: var(--color-processing-bg); color: #1e40af; border: 1px solid rgba(59,130,246,0.25); }

/* ============================================================
   Onboarding wizard
   ============================================================ */
.home-wrapper.onboarding-wrapper {
  flex: 1;
  padding: 3.5rem 1.5rem 5rem;
  max-width: 1160px;
  margin: 0 auto;
  width: 100%;
}

.page-hero {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1.5rem; margin-bottom: 2.5rem; flex-wrap: wrap;
}
.page-hero h1 {
  margin: 0;
  font-size: clamp(1.9rem, 2.8vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--em-navy-deep);
}
.page-hero > div > p.text-muted {
  margin: .5rem 0 0;
  max-width: 56ch;
  font-size: 1rem; line-height: 1.55;
  color: var(--text-muted);
}
.hero-eyebrow {
  font-size: .72rem; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--em-accent);
  margin: 0;
}

/* Progress bar */
.onboarding-progress-bar {
  min-width: 240px;
  background: var(--mkt-surface);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: .8rem 1rem;
}
.progress {
  background: var(--panel-muted-2);
  border-radius: 999px;
  overflow: hidden;
  height: .5rem;
}
.progress-bar {
  height: 100%;
  background: var(--em-grad-infinity);
  transition: width 300ms ease;
}
.small { font-size: .82rem; }
.fw-semibold { font-weight: 600; }

/* Timeline */
.onboarding-timeline { margin-bottom: 1.75rem; }
.onboarding-timeline__rail {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .75rem;
}
.timeline-node {
  appearance: none;
  background: var(--mkt-surface);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 1.1rem 1.15rem;
  cursor: pointer;
  text-align: left;
  display: flex; align-items: flex-start; gap: .85rem;
  transition: border-color .15s, box-shadow .15s, transform .1s;
  font-family: inherit;
  color: var(--text);
  position: relative;
}
.timeline-node:hover:not(:disabled) {
  border-color: var(--em-navy);
  transform: translateY(-1px);
}
.timeline-node:disabled { cursor: not-allowed; opacity: .6; }
.timeline-node.is-active {
  border-color: var(--em-blue);
  box-shadow: 0 0 0 3px var(--mkt-accent-ring), var(--mkt-shadow-primary);
}
.timeline-node.is-complete .timeline-node__marker {
  background: var(--em-teal);
  color: #fff;
}
.timeline-node.is-active .timeline-node__marker {
  background: var(--em-blue);
  color: #fff;
}
.timeline-node__marker {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--panel-muted);
  color: var(--text-muted);
  display: grid; place-items: center;
  font-weight: 600; font-size: .85rem;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  transition: background .15s, color .15s;
}
.timeline-node__content { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.timeline-node__title {
  font-weight: 600; font-size: .96rem;
  color: var(--em-navy-deep);
  letter-spacing: -0.005em;
}
.timeline-node__desc {
  font-size: .82rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Stage */
.wizard-stage {
  background: var(--mkt-surface);
  border: 1px solid var(--rule);
  border-radius: 20px;
  padding: 2.5rem 2.75rem;
  box-shadow: var(--shadow-lg, 0 24px 56px -24px rgba(15,23,42,0.12));
}
.wizard-stage__heading {
  text-align: center; margin-bottom: 1.5rem;
}
.wizard-stage__heading h3 {
  margin: .35rem 0 .35rem;
  font-size: clamp(1.4rem, 2.4vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--em-navy-deep);
}
.wizard-stage__heading p {
  margin: 0 auto;
  color: var(--text-muted);
  max-width: 56ch; line-height: 1.55;
}

/* Billing toggle */
.billing-toggle {
  display: inline-flex;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: .25rem;
  background: var(--panel-muted);
  gap: .1rem;
}
.billing-toggle--inline { margin-top: 1rem; }
.billing-toggle__option {
  appearance: none; border: none; background: transparent;
  padding: .45rem 1rem;
  border-radius: 999px;
  font-size: .88rem; font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: background .15s, color .15s, box-shadow .15s;
  font-family: inherit;
}
.billing-toggle__option.is-active {
  background: var(--mkt-surface);
  color: var(--em-navy-deep);
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}
.text-success { color: var(--mkt-teal); }

/* Plans */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.plan-card {
  background: var(--mkt-surface);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 1.4rem 1.25rem;
  display: flex; flex-direction: column; gap: 1rem;
  position: relative;
  transition: border-color .15s, transform .15s;
}
.plan-card:hover { transform: translateY(-2px); border-color: var(--em-navy); }
.plan-card--recommended {
  border-color: var(--em-blue);
  box-shadow: 0 0 0 3px var(--mkt-accent-tint), var(--mkt-shadow-primary-lg);
}
.plan-card--current {
  background: color-mix(in srgb, var(--em-blue) 5%, var(--mkt-surface));
}
.plan-card__badge {
  position: absolute; top: -11px; left: 50%;
  transform: translateX(-50%);
  background: var(--em-blue);
  color: #fff;
  padding: .25rem .7rem;
  font-size: .68rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  border-radius: 999px;
  white-space: nowrap;
}
.plan-header h5 {
  margin: 0 0 .25rem;
  font-size: 1.1rem; font-weight: 700;
  color: var(--em-navy-deep);
  letter-spacing: -0.01em;
}
.plan-header p {
  margin: 0; font-size: .85rem;
  line-height: 1.4;
  color: var(--text-muted);
}
.plan-price { display: flex; flex-direction: column; gap: .15rem; }
.plan-price strong {
  font-size: 1.6rem; font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--em-navy-deep);
}
.plan-price__strike {
  text-decoration: line-through;
  color: var(--text-muted);
  font-size: .82rem;
}
.plan-price__save {
  display: inline-block;
  font-size: .7rem; font-weight: 600;
  color: var(--mkt-teal);
  background: color-mix(in srgb, var(--mkt-teal) 14%, transparent);
  padding: .15rem .55rem;
  border-radius: 999px;
  align-self: flex-start;
  margin-top: .15rem;
  letter-spacing: .04em;
}
.plan-price small {
  font-size: .78rem;
  color: var(--text-muted);
}
.d-block { display: block; }
.plan-feature-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: .5rem;
  font-size: .86rem;
  color: var(--text);
}
.plan-feature-list li {
  display: flex; align-items: flex-start; gap: .5rem;
  line-height: 1.45;
}
.plan-feature-list li i {
  margin-top: 3px;
  color: var(--em-accent);
  flex-shrink: 0;
  font-size: .82rem;
}
.mt-auto { margin-top: auto; }

/* Security step */
.security-choice-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}
.security-choice {
  background: var(--mkt-surface);
  border: 1.5px solid var(--rule);
  border-radius: 16px;
  padding: 1.5rem 1.4rem;
  position: relative;
  cursor: pointer;
  transition: border-color .15s, transform .15s, box-shadow .15s;
  display: flex; flex-direction: column; gap: .75rem;
}
.security-choice:hover { border-color: var(--em-navy); transform: translateY(-2px); }
.security-choice.is-selected {
  border-color: var(--em-blue);
  background: color-mix(in srgb, var(--em-blue) 3%, var(--mkt-surface));
  box-shadow: 0 0 0 3px var(--mkt-accent-tint);
}
.security-choice__badge {
  position: absolute; top: 1rem; right: 1rem;
  font-size: .64rem; font-weight: 700;
  letter-spacing: .1em;
  padding: .2rem .55rem;
  border-radius: 999px;
  background: var(--panel-muted);
  color: var(--text-muted);
}
.security-choice.is-selected .security-choice__badge {
  background: var(--accent-tint); color: var(--em-accent);
}
.security-choice h4 {
  margin: .25rem 0;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--em-navy-deep);
}
.security-choice__features {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: .5rem;
  font-size: .86rem; color: var(--text);
  flex: 1;
}
.security-choice__features li {
  display: flex; align-items: flex-start; gap: .5rem;
  line-height: 1.45;
}
.security-choice__features li i {
  margin-top: 3px;
  color: var(--em-accent);
  flex-shrink: 0;
  font-size: .82rem;
}
.security-choice__features li .bi-shield-exclamation { color: var(--color-warning); }

/* ---------- Security comparison table ---------- */
.sec-cmp {
  margin-top: 1.25rem;
  border: 1px solid var(--rule);
  border-radius: 20px;
  background: var(--mkt-surface);
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
}
.sec-cmp__table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: .93rem;
  color: var(--em-navy-deep);
}
.sec-cmp__table thead th {
  vertical-align: top;
  padding: 1.1rem 1rem 1.1rem;
  border-bottom: 1px solid var(--rule);
  background: var(--panel-muted);
  text-align: left;
  font-weight: 600;
  position: relative;
  cursor: pointer;
  transition: background .15s ease, box-shadow .15s ease;
}
.sec-cmp__table thead th.sec-cmp__rowlabel {
  cursor: default;
  background: var(--panel-muted);
  width: 32%;
}
.sec-cmp__col:hover { background: color-mix(in srgb, var(--em-blue) 4%, var(--panel-muted)); }
.sec-cmp__col.is-selected {
  background: color-mix(in srgb, var(--col-ring, var(--em-accent)) 10%, var(--mkt-surface));
  box-shadow: inset 0 -3px 0 0 var(--col-ring, var(--em-accent));
}
.sec-cmp__badge {
  display: inline-block;
  font-size: .62rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  padding: .22rem .5rem; border-radius: 999px;
  background: color-mix(in srgb, var(--col-ring, var(--em-accent)) 15%, var(--mkt-surface));
  color: var(--col-ring, var(--em-accent));
  margin-bottom: .5rem;
}
.sec-cmp__name {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--em-navy-deep);
  margin-bottom: .55rem;
}
.sec-cmp__radio {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .8rem; font-weight: 600;
  color: var(--text-muted);
  padding: .32rem .65rem;
  border-radius: 999px;
  border: 1px solid var(--rule);
  background: var(--mkt-surface);
  transition: all .15s ease;
}
.sec-cmp__radio.is-on {
  color: var(--mkt-surface);
  background: var(--col-ring, var(--em-accent));
  border-color: transparent;
}
.sec-cmp__table tbody tr + tr th,
.sec-cmp__table tbody tr + tr td { border-top: 1px solid var(--rule); }
.sec-cmp__rowlabel {
  padding: .85rem 1rem;
  font-weight: 500;
  color: var(--text-muted);
  font-size: .88rem;
  background: var(--panel-muted);
}
.sec-cmp__cell {
  padding: .85rem 1rem;
  vertical-align: middle;
  text-align: left;
}
.sec-cmp__cell.is-selected-col {
  background: color-mix(in srgb, var(--em-blue) 4%, transparent);
}
.sec-cmp__check {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 999px;
  background: color-mix(in srgb, var(--mkt-teal) 15%, var(--mkt-surface));
  color: var(--mkt-teal);
  font-size: .92rem;
}
.sec-cmp__dash {
  display: inline-block;
  width: 24px; text-align: center;
  color: var(--text-muted);
  opacity: .6;
}
.sec-cmp__note {
  font-size: .88rem;
  color: var(--em-navy-deep);
  line-height: 1.4;
}

/* ---------- Key management setup panel ---------- */
.sec-key-setup {
  margin-top: 1.5rem;
  padding: 1.5rem;
  border-radius: 20px;
  background: var(--panel-muted);
  border: 1px solid var(--rule);
}
[data-theme='dark'] .sec-key-setup {
  background: var(--mkt-surface-band-2);
  border-color: var(--mkt-rule);
}
.sec-key-setup h4 {
  margin: .25rem 0 .9rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-strong);
}
.sec-key-setup__list {
  list-style: none; padding: 0; margin: 0 0 1rem;
  display: flex; flex-direction: column; gap: .5rem;
  font-size: .88rem;
  color: var(--text);
}
.sec-key-setup__list li {
  display: flex; align-items: flex-start; gap: .55rem;
  line-height: 1.45;
}
.sec-key-setup__list li i {
  margin-top: 3px;
  color: var(--mkt-teal);
  flex-shrink: 0;
  font-size: .88rem;
}
.sec-key-setup__list li.is-warning {
  color: #f59e0b;
  font-weight: 500;
}
.sec-key-setup__list li.is-warning i { color: #f59e0b; }
[data-theme='dark'] .sec-key-setup__list li.is-warning { color: #fbbf24; }
[data-theme='dark'] .sec-key-setup__list li.is-warning i { color: #fbbf24; }
.sec-key-setup .terms-check {
  color: var(--text);
  font-weight: 500;
}
.sec-key-setup__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .9rem;
}
.sec-key-opt {
  background: var(--mkt-surface);
  border: 1.5px solid var(--rule);
  border-radius: 16px;
  padding: 1rem 1.1rem;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .15s;
  display: flex; flex-direction: column; gap: .5rem;
}
.sec-key-opt:hover { border-color: var(--em-navy); }
.sec-key-opt.is-selected {
  border-color: var(--em-blue);
  box-shadow: 0 0 0 3px var(--mkt-accent-tint);
  background: color-mix(in srgb, var(--em-blue) 3%, var(--mkt-surface));
}
.sec-key-opt h5 {
  margin: 0; font-size: 1rem; font-weight: 600;
  color: var(--text-strong);
}
.sec-key-opt .sec-key-setup__list { color: var(--text); }

/* ---- OfflineByokInline overrides inside key-setup ---- */
.sec-key-setup .inline-byok-panel {
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 1.25rem;
  background: var(--mkt-surface);
}
[data-theme='dark'] .sec-key-setup .inline-byok-panel {
  background: var(--mkt-surface-band-1);
  border-color: var(--mkt-rule);
}
.sec-key-setup .inline-byok.card {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}
.sec-key-setup .inline-byok .card-body { padding: 0; color: var(--text); }
.sec-key-setup .inline-byok h5 { color: var(--text-strong); }
.sec-key-setup .inline-byok .text-muted { color: var(--text-muted) !important; }
.sec-key-setup .inline-byok .form-label,
.sec-key-setup .inline-byok .form-check-label {
  color: var(--text);
  font-size: .88rem;
}
.sec-key-setup .inline-byok .form-control {
  background: var(--panel-muted);
  border: 1px solid var(--rule);
  color: var(--text-strong);
  border-radius: 10px;
  padding: .6rem .85rem;
  font-size: .9rem;
}
[data-theme='dark'] .sec-key-setup .inline-byok .form-control {
  background: var(--mkt-surface-band-2);
  border-color: var(--mkt-rule);
  color: var(--mkt-text);
}
.sec-key-setup .inline-byok .form-control:focus {
  border-color: var(--em-blue);
  box-shadow: 0 0 0 3px var(--mkt-accent-ring);
  outline: none;
}
.sec-key-setup .inline-byok .form-text { color: var(--text-muted); }
.sec-key-setup .inline-byok .badge {
  font-size: .68rem;
  padding: .3rem .6rem;
  border-radius: 999px;
}
.sec-key-setup .inline-byok .table { color: var(--text); }
.sec-key-setup .inline-byok .table th { color: var(--text-muted); font-weight: 600; font-size: .82rem; }
.sec-key-setup .inline-byok .table td { color: var(--text); font-size: .86rem; }
.sec-key-setup .inline-byok .table,
.sec-key-setup .inline-byok .table th,
.sec-key-setup .inline-byok .table td { border-color: var(--rule); }
.sec-key-setup .inline-byok__result {
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 1rem;
  background: var(--panel-muted);
}
[data-theme='dark'] .sec-key-setup .inline-byok__result {
  background: var(--mkt-surface-band-2);
  border-color: var(--mkt-rule);
}
.sec-key-setup .inline-byok .fw-semibold { color: var(--text-strong); }

/* ---- BYOK configuration panel ---- */
.byok-config-panel {
  margin-top: 1.25rem;
  padding: 1.25rem;
  border: 1px solid var(--rule);
  border-radius: 16px;
  background: var(--mkt-surface);
}
[data-theme='dark'] .byok-config-panel {
  background: var(--mkt-surface-band-1);
  border-color: var(--mkt-rule);
}
.byok-config-panel h5 {
  margin: 0 0 .25rem;
  font-size: .95rem;
  font-weight: 600;
  color: var(--text-strong);
}
.byok-config-panel p { color: var(--text-muted); font-size: .88rem; }
.byok-provider-toggle {
  display: inline-flex;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 3px;
  background: var(--panel-muted);
  gap: 2px;
  margin-bottom: 1rem;
}
.byok-provider-toggle__opt {
  appearance: none; border: none; background: transparent;
  padding: .4rem 1rem;
  border-radius: 999px;
  font: inherit; font-size: .85rem; font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.byok-provider-toggle__opt:hover { color: var(--text-strong); }
.byok-provider-toggle__opt.is-active {
  background: var(--mkt-surface);
  color: var(--text-strong);
  box-shadow: 0 1px 3px rgba(0,0,0,.1);
}
[data-theme='dark'] .byok-provider-toggle__opt.is-active {
  background: var(--mkt-surface-band-2);
}
.byok-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .9rem;
}
@media (max-width: 640px) { .byok-form-grid { grid-template-columns: 1fr; } }
.byok-field { display: flex; flex-direction: column; gap: .3rem; }
.byok-field.is-full { grid-column: 1 / -1; }
.byok-field label {
  font-size: .82rem; font-weight: 500;
  color: var(--text-strong);
}
.byok-field .byok-input {
  width: 100%;
  padding: .6rem .85rem;
  border-radius: 10px;
  border: 1px solid var(--rule);
  background: var(--panel-muted);
  color: var(--text-strong);
  font-size: .88rem;
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
[data-theme='dark'] .byok-field .byok-input {
  background: var(--mkt-surface-band-2);
  border-color: var(--mkt-rule);
  color: var(--mkt-text);
}
.byok-field .byok-input::placeholder { color: var(--text-muted); opacity: .7; }
.byok-field .byok-input:focus {
  outline: none;
  border-color: var(--em-blue);
  box-shadow: 0 0 0 3px var(--mkt-accent-ring);
}
.byok-field small { font-size: .78rem; color: var(--text-muted); line-height: 1.35; }
.byok-actions {
  display: flex; gap: .6rem; align-items: center;
  margin-top: 1rem;
  flex-wrap: wrap;
}

/* Responsive: collapse comparison table on small viewports */
@media (max-width: 720px) {
  .sec-cmp__table,
  .sec-cmp__table thead,
  .sec-cmp__table tbody,
  .sec-cmp__table tr { display: block; }
  .sec-cmp__table thead tr { display: none; }
  .sec-cmp__table tbody tr {
    border-top: 1px solid var(--rule);
    padding: .5rem 0;
  }
  .sec-cmp__cell { display: flex; justify-content: space-between; border: none; }
  .sec-cmp__rowlabel { background: transparent; padding-bottom: .25rem; }
  .sec-key-setup__grid { grid-template-columns: 1fr; }
}

/* Wizard footer */
.wizard-stage__footer {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 1.5rem;
  margin-top: 2.25rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--rule);
  flex-wrap: wrap;
}
.wizard-stage__status { max-width: 520px; }
.wizard-stage__status .hero-eyebrow { margin-bottom: .35rem; }
.wizard-stage__status h4 { margin: 0 0 .25rem; font-size: 1.05rem; color: var(--em-navy-deep); }
.wizard-stage__status p { margin: 0; font-size: .9rem; line-height: 1.5; color: var(--text-muted); }
.wizard-stage__status.is-complete .hero-eyebrow { color: var(--mkt-teal); }
.wizard-stage__nav { display: flex; gap: .6rem; flex-wrap: wrap; }

/* Upload */
.upload-step {
  max-width: 840px;
  margin: 0 auto;
  padding: .5rem 0 0;
}

.upload-step__header {
  text-align: center;
  margin: 0 auto 2rem;
}

.upload-step__header h3 {
  margin: .35rem 0 .45rem;
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--em-navy-deep);
}

.onboarding-upload-dropzone {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
  padding: 3rem 2rem 2.5rem;
  text-align: center;
  border: 1.5px dashed color-mix(in srgb, var(--em-blue) 34%, var(--rule));
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 0%, rgba(93,225,214,.12), transparent 42%),
    color-mix(in srgb, var(--panel-muted) 78%, white);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}

.onboarding-upload-dropzone__icon {
  display: inline-grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 1rem;
  border-radius: 18px;
  color: var(--em-blue);
  background: color-mix(in srgb, var(--em-blue) 9%, white);
  box-shadow: 0 14px 30px -24px rgba(37,99,235,.85);
}

.onboarding-upload-dropzone__icon i {
  font-size: 2rem;
}

.onboarding-upload-dropzone__title {
  margin: 0 0 .35rem;
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--em-navy-deep);
}

.onboarding-upload-dropzone__cta {
  margin-top: 1.5rem;
  min-width: 168px;
}

.upload-checklist {
  list-style: none;
  padding: 0;
  margin: 2rem auto 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .85rem;
  font-size: .88rem;
  color: var(--text-muted);
}

.upload-checklist li {
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  min-height: 118px;
  padding: 1rem;
  background:
    linear-gradient(180deg, rgba(255,255,255,.7), rgba(255,255,255,0)),
    var(--panel-muted);
  border: 1px solid var(--rule);
  border-radius: 18px;
  line-height: 1.45;
}

.upload-checklist li i {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-top: 1px;
  flex-shrink: 0;
  color: var(--mkt-teal);
  background: color-mix(in srgb, var(--mkt-teal) 12%, white);
  border-radius: 999px;
}

/* Billing summary — sits flat inside .wizard-stage, no extra chrome */
.billing-summary-card {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1.25rem;
  margin-bottom: .5rem;
}
.billing-summary-card h4 {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  color: var(--em-navy-deep);
}

/* ============================================================
   Footer (marketing 1:1, trimmed)
   ============================================================ */
.auth-footer-site {
  background: var(--mkt-surface);
  border-top: 1px solid var(--rule);
  padding: 3rem 0 2rem;
  margin-top: auto;
}
.auth-footer-site__inner {
  max-width: 1120px; margin: 0 auto; padding: 0 1.5rem;
  display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap;
}
.auth-footer-site__brand {
  display: flex; align-items: center; gap: .55rem;
  font-weight: 700; font-size: 1.05rem; letter-spacing: -0.015em;
  color: var(--text-strong);
}
.auth-footer-site__brand img { width: 24px; height: auto; }
.auth-footer-site__legal {
  display: flex; gap: 1.5rem; font-size: .85rem; color: var(--text-muted);
  flex-wrap: wrap;
}
.auth-footer-site__legal a {
  color: var(--text-muted); text-decoration: none;
  transition: color .15s;
}
.auth-footer-site__legal a:hover { color: var(--em-accent); }

/* ============================================================
   Utilities
   ============================================================ */
.d-flex { display: flex; }
.flex-column { flex-direction: column; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.gap-2 { gap: .5rem; }
.gap-3 { gap: .75rem; }
.text-center { text-align: center; }
.text-end { text-align: right; }
.text-uppercase { text-transform: uppercase; }
.text-muted { color: var(--text-muted); }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: .25rem; }
.mb-2 { margin-bottom: .5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.25rem; }
.mt-2 { margin-top: .5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.25rem; }
.me-1 { margin-right: .25rem; }
.me-2 { margin-right: .5rem; }
.ms-1 { margin-left: .25rem; }

/* ============================================================
   Theme toggle button (placed inside nav)
   ============================================================ */
.nav__theme {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--rule);
  background: var(--mkt-surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
  font-family: inherit;
  padding: 0;
}
.nav__theme:hover { color: var(--em-navy-deep); border-color: var(--em-navy); background: var(--panel-muted); }
.nav__theme i { font-size: 1rem; }

/* ============================================================
   Mobile / responsive
   ============================================================ */
@media (max-width: 960px) {
  .auth-grid { grid-template-columns: 1fr; gap: 1.25rem; }
  .home-wrapper.auth-wrapper { padding: 2.5rem 1rem 3.5rem; }
  .auth-wrapper__lede { margin-bottom: 2rem; font-size: .96rem; }
  .auth-hero-card, .auth-card { padding: 1.75rem 1.5rem; border-radius: 16px; }
  .auth-hero-card h1 { font-size: clamp(1.65rem, 6vw, 2.1rem); }
  .auth-card__header h2 { font-size: 1.3rem; }
  .onboarding-timeline__rail { grid-template-columns: 1fr 1fr; }
  .plan-grid { grid-template-columns: 1fr 1fr; }
  .security-choice-grid { grid-template-columns: 1fr; }
  .wizard-stage { padding: 1.5rem; border-radius: 16px; }
  .wizard-stage__footer { flex-direction: column; align-items: stretch; }
  .wizard-stage__nav { justify-content: flex-end; }
  .page-hero { flex-direction: column; align-items: stretch; }
  .page-hero h1 { font-size: 1.6rem; }
  .onboarding-progress-bar { min-width: 0; }
  .auth-footer-site__inner { flex-direction: column; align-items: flex-start; gap: 1rem; }
}
@media (max-width: 640px) {
  .nav__inner { padding: .85rem 1rem; gap: 1rem; }
  .nav__brand { font-size: 1rem; }
  .nav__brand img { width: 24px; }
  .nav__beta { display: none; }
  .nav__cta { gap: .5rem; }
  .nav__cta .nav__login { font-size: .86rem; }
  .nav__cta .btn-sm { padding: .4rem .75rem; font-size: .82rem; }
  .form-field-grid { grid-template-columns: 1fr; }
  .auth-hero-card, .auth-card { padding: 1.5rem 1.25rem; }
  .auth-hero-card h1 { font-size: 1.55rem; line-height: 1.15; }
  .pricing-grid, .onboarding-timeline__rail { grid-template-columns: 1fr !important; }
  .upload-checklist { grid-template-columns: 1fr; }
  .upload-checklist li { min-height: 0; }
  .onboarding-upload-dropzone { padding: 2rem 1rem 1.75rem; }
  .timeline-node { padding: .9rem 1rem; }
  .wizard-stage { padding: 1.25rem 1rem; }
  .sec-cmp { border: none !important; background: transparent !important; box-shadow: none !important; padding: 0 !important; }
  .sec-cmp__table thead tr, .sec-cmp__table tbody { display: none !important; }
  .sec-mobile-list { display: flex !important; flex-direction: column; gap: .75rem; margin-top: 1rem; }
  .wizard-stage__heading h3 { font-size: 1.25rem; }
  .auth-footer-site__legal { gap: 1rem; font-size: .82rem; }
  .auth-wrapper__eyebrow { font-size: .7rem; }
}

/* ============================================================
   Onboarding — mobile variant (inside DeviceFrame, 390px)
   ============================================================ */
.onboarding-frame.is-mobile { font-size: 15px; }
.onboarding-frame.is-mobile .nav { position: static; background: var(--mkt-surface); }
.onboarding-frame.is-mobile .nav__inner { padding: .7rem 1rem; gap: .5rem; }
.onboarding-frame.is-mobile .nav__brand { font-size: .98rem; }
.onboarding-frame.is-mobile .nav__brand img { width: 22px; }
.onboarding-frame.is-mobile .nav__beta { display: none; }
.onboarding-frame.is-mobile .nav__links { display: none; }
.onboarding-frame.is-mobile .nav__cta .nav__login { display: none; }
.onboarding-frame.is-mobile .nav__cta { gap: .4rem; }
.onboarding-frame.is-mobile .nav__cta .btn { padding: .4rem .75rem; font-size: .82rem; }

.onboarding-frame.is-mobile .home-wrapper.onboarding-wrapper {
  padding: 1rem 1rem 0;
  max-width: 100%;
}
.onboarding-frame.is-mobile .page-hero { margin-bottom: 1rem; flex-direction: column; align-items: stretch; gap: .75rem; }
.onboarding-frame.is-mobile .page-hero h1 { font-size: 1.45rem; letter-spacing: -0.02em; }
.onboarding-frame.is-mobile .page-hero > div > p.text-muted { font-size: .88rem; line-height: 1.45; margin-top: .35rem; }
.onboarding-frame.is-mobile .onboarding-progress-bar { padding: .65rem .8rem; border-radius: 12px; }

/* Mobile timeline — horizontal dots + label for current step */
.onboarding-frame.is-mobile .onboarding-timeline { margin-bottom: 1rem; }
.onboarding-frame.is-mobile .onboarding-timeline__rail {
  display: flex; gap: .45rem;
  padding: .55rem .65rem;
  background: var(--mkt-surface);
  border: 1px solid var(--rule);
  border-radius: 999px;
  overflow: hidden;
}
.onboarding-frame.is-mobile .timeline-node {
  flex: 1; min-width: 0;
  padding: .5rem .35rem;
  background: transparent;
  border: none;
  border-radius: 999px;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
  text-align: center;
}
.onboarding-frame.is-mobile .timeline-node:hover:not(:disabled) { transform: none; border: none; background: var(--panel-muted); }
.onboarding-frame.is-mobile .timeline-node.is-active {
  box-shadow: none;
  background: color-mix(in srgb, var(--em-blue) 10%, var(--mkt-surface));
  border: none;
}
.onboarding-frame.is-mobile .timeline-node__marker {
  width: 26px; height: 26px; font-size: .74rem;
}
.onboarding-frame.is-mobile .timeline-node__title {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 100%;
}
.onboarding-frame.is-mobile .timeline-node.is-active .timeline-node__title { color: var(--em-navy-deep); }
.onboarding-frame.is-mobile .timeline-node__desc { display: none; }

/* Wizard stage — edge-to-edge on mobile */
.onboarding-frame.is-mobile .wizard-stage {
  padding: 1.25rem 1rem 1.5rem;
  border-radius: 16px;
  box-shadow: none;
}
.onboarding-frame.is-mobile .wizard-stage__heading h3 { font-size: 1.15rem; }
.onboarding-frame.is-mobile .wizard-stage__heading p { font-size: .88rem; }

/* Plans — stack as rounded standalone cards on mobile (no shared rule/dividers) */
.onboarding-frame.is-mobile .pricing-grid {
  grid-template-columns: 1fr;
  border: 0;
  margin-top: 1.25rem;
  gap: .75rem;
}
.onboarding-frame.is-mobile .price {
  padding: 1.1rem 1.1rem 1.25rem;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--mkt-surface);
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "name    amount"
    "tag     amount"
    "sub     sub"
    "feats   feats"
    "cta     cta";
  column-gap: 1rem;
  row-gap: .35rem;
}
.onboarding-frame.is-mobile .price .price__name   { grid-area: name;   font-size: 1.02rem; }
.onboarding-frame.is-mobile .price .price__tag    { grid-area: tag;    font-size: .78rem; }
.onboarding-frame.is-mobile .price .price__amount { grid-area: amount; font-size: 1.35rem; margin: 0; text-align: right; align-self: start; }
.onboarding-frame.is-mobile .price .price__amount small { font-size: .7rem; }
.onboarding-frame.is-mobile .price .price__sub   { grid-area: sub; margin-top: .2rem; font-size: .72rem; }
.onboarding-frame.is-mobile .price .price__feats { grid-area: feats; margin: .6rem 0 .85rem; gap: .4rem; font-size: .82rem; }
.onboarding-frame.is-mobile .price .price__cta   { grid-area: cta; margin-top: 0; }

/* Popular card: same shape as the rest, just an accent ring + inline badge */
.onboarding-frame.is-mobile .price.is-popular {
  margin: 0;
  border-radius: 14px;
  padding: 1.25rem 1.1rem 1.35rem;
  box-shadow: 0 8px 18px -12px rgba(37,99,235,0.35);
}
.onboarding-frame.is-mobile .price.is-popular::before {
  top: -10px; left: 50%; right: auto; transform: translateX(-50%);
  font-size: .6rem; padding: .22rem .6rem;
}
.onboarding-frame.is-mobile .price.is-popular .price__amount { font-size: 1.5rem; }

.onboarding-frame.is-mobile .pricing__yearly { font-size: .78rem; margin-top: 1rem; }
.onboarding-frame.is-mobile .billing-toggle__option { padding: .4rem .8rem; font-size: .82rem; }

/* Same compact plan layout for real mobile browsers (not just the canvas frame) */
@media (max-width: 640px) {
  .pricing-grid {
    border: 0;
    margin-top: 1.25rem;
    gap: .75rem;
  }
  .price {
    padding: 1.1rem 1.1rem 1.25rem;
    border: 1px solid var(--rule);
    border-radius: 14px;
    background: var(--mkt-surface);
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "name    amount"
      "tag     amount"
      "sub     sub"
      "feats   feats"
      "cta     cta";
    column-gap: 1rem;
    row-gap: .35rem;
  }
  .price .price__name   { grid-area: name; }
  .price .price__tag    { grid-area: tag; }
  .price .price__amount { grid-area: amount; margin: 0; text-align: right; align-self: start; }
  .price .price__sub    { grid-area: sub; margin-top: .2rem; }
  .price .price__feats  { grid-area: feats; margin: .6rem 0 .85rem; }
  .price .price__cta    { grid-area: cta; margin-top: 0; }
  .price.is-popular {
    margin: 0;
    border-radius: 14px;
    padding: 1.25rem 1.1rem 1.35rem;
  }
  .price.is-popular::before {
    top: -10px; left: 50%; right: auto; transform: translateX(-50%);
  }
}

/* ============================================================
   Airy onboarding refresh
   Scoped overrides keep behavior intact while removing old card chrome.
   ============================================================ */
.onboarding-wrapper .page-hero {
  background: transparent;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  padding: .35rem 0 1.35rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 2rem;
}
.onboarding-wrapper .page-hero h1 {
  margin: 0;
  font-size: clamp(2rem, 3.2vw, 2.8rem);
  font-weight: 760;
  line-height: 1;
  letter-spacing: -0.045em;
}
.onboarding-wrapper .page-hero > div > p.text-muted {
  margin: .65rem 0 0;
  font-size: .95rem;
  line-height: 1.45;
}
.onboarding-wrapper .onboarding-progress-bar {
  background: transparent;
  border: 0;
  border-left: 1px solid var(--rule);
  border-radius: 0;
  padding: 0 0 0 1.25rem;
  min-width: 220px;
}
.onboarding-wrapper .onboarding-timeline__rail {
  gap: 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.onboarding-wrapper .timeline-node {
  background: transparent;
  border: 0;
  border-right: 1px solid var(--rule);
  border-radius: 0;
  padding: 1rem 1.1rem;
  transition: background .15s, color .15s;
}
.onboarding-wrapper .timeline-node:last-child { border-right: 0; }
.onboarding-wrapper .timeline-node:hover:not(:disabled) {
  background: color-mix(in srgb, var(--em-blue) 4%, transparent);
  transform: none;
}
.onboarding-wrapper .timeline-node.is-active {
  border-color: transparent;
  box-shadow: inset 0 -2px 0 var(--em-blue);
  background: color-mix(in srgb, var(--em-blue) 6%, transparent);
}
.onboarding-wrapper .timeline-node__marker {
  width: 30px;
  height: 30px;
  background: transparent;
  border: 1px solid var(--rule);
}
.onboarding-wrapper .timeline-node.is-active .timeline-node__marker {
  border-color: var(--em-blue);
}
.onboarding-wrapper .timeline-node.is-complete .timeline-node__marker {
  border-color: var(--em-teal);
}
.onboarding-wrapper .wizard-stage {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 1.5rem 0 0;
}
.onboarding-wrapper .wizard-stage__heading {
  text-align: center !important;
  padding-bottom: 1.25rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--rule);
}
.onboarding-wrapper .wizard-stage__heading p {
  margin-left: auto !important;
  margin-right: auto !important;
}
.onboarding-wrapper .wizard-stage__heading .billing-toggle {
  margin-left: auto;
  margin-right: auto;
}
.onboarding-wrapper .pricing-grid {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.onboarding-wrapper .price {
  background: transparent;
  padding: 1.45rem 1.25rem 1.6rem;
}
.onboarding-wrapper .price.is-popular {
  background: var(--mkt-surface);
  box-shadow:
    0 1px 2px rgba(15,23,42,0.04),
    0 20px 40px -18px rgba(37,99,235,0.35),
    0 8px 20px -12px rgba(15,23,42,0.18);
}

@media (max-width: 768px) {
  .onboarding-wrapper .page-hero,
  .onboarding-wrapper .onboarding-timeline__rail {
    align-items: stretch;
  }
  .onboarding-wrapper .onboarding-progress-bar {
    border-left: 0;
    border-top: 1px solid var(--rule);
    padding: 1rem 0 0;
    width: 100%;
  }
  .onboarding-wrapper .onboarding-timeline__rail {
    grid-template-columns: 1fr !important;
  }
  .onboarding-wrapper .timeline-node {
    border-right: 0;
    border-bottom: 1px solid var(--rule);
  }
  .onboarding-wrapper .timeline-node:last-child { border-bottom: 0; }
}

/* Security step — stack to vertical card list, hide comparison table.
   Applies BOTH inside the mobile design-canvas frame AND at narrow viewports
   on the standalone Onboarding.html so real phones get the correct layout. */
.sec-mobile-list { display: none; }

.onboarding-frame.is-mobile .sec-cmp__table thead tr,
.onboarding-frame.is-mobile .sec-cmp__table tbody { display: none; }
.onboarding-frame.is-mobile .sec-cmp {
  border: none;
  background: transparent;
  box-shadow: none;
  padding: 0;
}
.onboarding-frame.is-mobile .sec-cmp::before { content: ""; display: none; }
.onboarding-frame.is-mobile .security-step .sec-mobile-list,
.onboarding-frame.is-mobile .sec-mobile-list {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  margin-top: 1rem;
}

@media (max-width: 640px) {
  .sec-cmp__table thead tr,
  .sec-cmp__table tbody { display: none; }
  .sec-cmp {
    border: none;
    background: transparent;
    box-shadow: none;
    padding: 0;
  }
  .sec-cmp::before { content: ""; display: none; }
  .sec-mobile-list {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    margin-top: 1rem;
  }
}
.sec-mobile-card {
  background: var(--mkt-surface);
  border: 1.5px solid var(--rule);
  border-radius: 16px;
  padding: 1.1rem 1.1rem;
  position: relative;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.sec-mobile-card.is-selected {
  border-color: var(--col-ring, var(--em-blue));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--col-ring, var(--em-blue)) 15%, transparent);
  background: color-mix(in srgb, var(--col-ring, var(--em-blue)) 4%, var(--mkt-surface));
}
.sec-mobile-card__head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: .75rem; margin-bottom: .5rem;
}
.sec-mobile-card__name { font-weight: 700; font-size: 1.02rem; color: var(--em-navy-deep); letter-spacing: -0.01em; }
.sec-mobile-card__badge {
  display: inline-block;
  font-size: .58rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: .22rem .5rem; border-radius: 999px;
  background: color-mix(in srgb, var(--col-ring) 15%, var(--mkt-surface));
  color: var(--col-ring);
  margin-bottom: .35rem;
}
.sec-mobile-card__radio {
  width: 22px; height: 22px; border-radius: 999px;
  border: 2px solid var(--rule);
  display: grid; place-items: center;
  flex-shrink: 0;
  background: var(--mkt-surface);
}
.sec-mobile-card.is-selected .sec-mobile-card__radio {
  border-color: var(--col-ring);
  background: var(--col-ring);
  color: #fff;
}
.sec-mobile-card__radio svg { opacity: 0; }
.sec-mobile-card.is-selected .sec-mobile-card__radio svg { opacity: 1; }
.sec-mobile-card__rows {
  display: flex; flex-direction: column; gap: .4rem;
  font-size: .84rem;
  margin-top: .35rem;
}
.sec-mobile-card__row {
  display: flex; justify-content: space-between; align-items: center; gap: .75rem;
}
.sec-mobile-card__row > span:first-child { color: var(--text-muted); }
.sec-mobile-card__row > span:last-child { color: var(--em-navy-deep); font-weight: 500; text-align: right; }
.sec-mobile-card__row .sec-cmp__check { width: 20px; height: 20px; font-size: .8rem; }

.onboarding-frame.is-mobile .sec-key-setup { padding: 1rem; border-radius: 14px; }
.onboarding-frame.is-mobile .sec-key-setup__grid { grid-template-columns: 1fr; }

/* Billing + Upload on mobile */
.onboarding-frame.is-mobile .billing-summary-card { padding: 0; padding-bottom: 1rem; }
.onboarding-frame.is-mobile .billing-summary-card h4 { font-size: 1.05rem; }
.onboarding-frame.is-mobile .upload-checklist { grid-template-columns: 1fr; }
.onboarding-frame.is-mobile .upload-checklist li { padding: .6rem .75rem; font-size: .84rem; }
.onboarding-frame.is-mobile .onboarding-upload-dropzone { padding: 1.75rem 1rem; border-radius: 20px; }
.onboarding-frame.is-mobile .btn-lg { padding: .75rem 1.1rem; font-size: .94rem; }

/* Wizard footer → absolutely-pinned bottom bar inside each DeviceFrame */
.onboarding-frame.is-mobile { position: relative; }
.onboarding-frame.is-mobile .wizard-stage__footer {
  position: sticky;
  left: 0; right: 0; bottom: 0;
  margin: 1rem -1rem 0;
  padding: .7rem 1rem calc(.7rem + env(safe-area-inset-bottom, 0));
  background: color-mix(in srgb, var(--mkt-surface) 94%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--rule);
  border-radius: 0;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  z-index: 50;
  gap: .75rem;
}
.onboarding-frame.is-mobile .wizard-stage__status {
  flex: 1; min-width: 0; max-width: none;
}
.onboarding-frame.is-mobile .wizard-stage__status h4 { font-size: .9rem; }
.onboarding-frame.is-mobile .wizard-stage__status p { font-size: .76rem; line-height: 1.3; display: none; }
.onboarding-frame.is-mobile .wizard-stage__status .hero-eyebrow { font-size: .58rem; margin-bottom: .15rem; }
.onboarding-frame.is-mobile .wizard-stage__nav { flex-shrink: 0; gap: .4rem; }
.onboarding-frame.is-mobile .wizard-stage__nav .btn {
  padding: .6rem .8rem;
  font-size: .85rem;
}
.onboarding-frame.is-mobile .wizard-stage__nav .btn-lg { padding: .7rem 1rem; font-size: .88rem; }

/* Hide the site footer on mobile device frame — not useful in the viewport */
.onboarding-frame.is-mobile .auth-footer-site { display: none; }

/* =========================================================================
   AIRY auth layout — matches marketing/app aesthetic
   No hero card, no side-by-side boxes. Single centered column with big
   display type, radial gradient background, and unboxed form. Copies the
   marketing site's `.hero` vocabulary directly.
   ========================================================================= */
.auth-airy {
  position: relative;
  flex: 1 1 auto;
  padding: 5rem 1.5rem 4rem;
  overflow: hidden;
}
.auth-airy::before {
  content: '';
  position: absolute;
  inset: -10% -10% auto -10%;
  height: 80%;
  background:
    radial-gradient(60% 70% at 20% 25%, rgba(37, 99, 235, 0.12), transparent 70%),
    radial-gradient(50% 60% at 85% 5%, rgba(45, 191, 169, 0.14), transparent 70%);
  pointer-events: none;
}
html[data-theme='dark'] .auth-airy::before,
[data-theme='dark'] .auth-airy::before {
  background:
    radial-gradient(60% 70% at 20% 25%, rgba(59, 130, 246, 0.18), transparent 70%),
    radial-gradient(50% 60% at 85% 5%, rgba(93, 225, 214, 0.16), transparent 70%);
}

.auth-airy__inner {
  position: relative;
  max-width: 460px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: center;
}

.auth-airy__eyebrow {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--mkt-teal);
  margin: 0 0 1.1rem;
}
html[data-theme='dark'] .auth-airy__eyebrow,
[data-theme='dark'] .auth-airy__eyebrow {
  color: var(--mkt-teal-soft);
}

.auth-airy__title {
  font-size: clamp(2rem, 4.2vw, 2.85rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin: 0 auto 1.1rem;
  max-width: 14ch;
  color: var(--em-navy-deep);
  text-wrap: balance;
}
.auth-airy__title .accent {
  background: var(--em-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-airy__lede {
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 40ch;
  margin: 0 auto 2.5rem;
  text-wrap: pretty;
}

/* The form block — NO chrome. Just space. */
.auth-airy__form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: left;
}

.auth-airy__switch {
  margin: 1.75rem 0 0;
  font-size: .92rem;
  color: var(--text-muted);
  text-align: center;
}
.auth-airy__switch .auth-link {
  color: var(--em-accent);
  font-weight: 500;
}

.auth-airy__trust {
  list-style: none;
  padding: 0;
  margin: 3rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  font-size: .82rem;
  color: var(--text-muted);
}
.auth-airy__trust li {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.auth-airy__trust li i {
  color: var(--em-navy);
  font-size: .9rem;
}
html[data-theme='dark'] .auth-airy__trust li i,
[data-theme='dark'] .auth-airy__trust li i {
  color: var(--em-teal);
}

/* Password label with forgot-link tucked right */
.form-field__label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}
.form-field__label-row label { margin: 0; }
.auth-link--muted {
  color: var(--text-muted);
  font-size: .8rem;
  text-decoration: none;
}
.auth-link--muted:hover {
  color: var(--em-accent);
  text-decoration: underline;
}

/* In airy mode, social buttons keep a light outline on a clean surface.
   Override the dark-mode lift that would otherwise look like a card. */
.auth-airy__form .social-btn {
  background: var(--mkt-surface);
  border: 1px solid var(--rule);
}
html[data-theme='dark'] .auth-airy__form .social-btn,
[data-theme='dark'] .auth-airy__form .social-btn {
  background: var(--mkt-surface-band-1);
  border-color: var(--rule);
}

/* Inputs on the clean page — subtle outline, no heavy fill. */
.auth-airy__form .modern-input {
  background: var(--mkt-surface);
  border: 1px solid var(--rule);
}
html[data-theme='dark'] .auth-airy__form .modern-input,
[data-theme='dark'] .auth-airy__form .modern-input {
  background: var(--mkt-surface-band-1);
  border-color: var(--rule);
}

/* Mobile — tighten vertical padding; the airy feel is vertical space, not chrome */
@media (max-width: 720px) {
  .auth-airy { padding: 2.5rem 1rem 3rem; }
  .auth-airy__title { font-size: clamp(1.75rem, 7vw, 2.2rem); }
  .auth-airy__lede { margin-bottom: 2rem; }
  .auth-airy__trust { gap: 1rem 1.2rem; margin-top: 2rem; }
}

/* =========================================================================
   Dark mode — card elevation pass.
   Without this, every card sits flat on --mkt-surface (#05070d) which reads
   as a single black field. We lift cards, inputs and tracks to
   --mkt-surface-band-1 so the page has the same card-on-panel rhythm the
   marketing site gets from its zebra sections.
   ========================================================================= */
html[data-theme='dark'] .auth-card,
[data-theme='dark'] .auth-card,
html[data-theme='dark'] .plan-card,
[data-theme='dark'] .plan-card,
html[data-theme='dark'] .security-choice,
[data-theme='dark'] .security-choice,
html[data-theme='dark'] .billing-summary-card { border-color: var(--mkt-rule); }
[data-theme='dark'] .billing-summary-card { border-color: var(--mkt-rule); }
html[data-theme='dark'] .upload-checklist,
[data-theme='dark'] .upload-checklist,
html[data-theme='dark'] .wizard-stage,
[data-theme='dark'] .wizard-stage,
html[data-theme='dark'] .page-hero,
[data-theme='dark'] .page-hero,
html[data-theme='dark'] .auth-hero-card,
[data-theme='dark'] .auth-hero-card,
html[data-theme='dark'] .modern-card,
[data-theme='dark'] .modern-card {
  background: var(--mkt-surface-band-1);
  border-color: var(--mkt-rule);
}

html[data-theme='dark'] .onboarding-upload-dropzone,
[data-theme='dark'] .onboarding-upload-dropzone {
  background:
    radial-gradient(circle at 50% 0%, rgba(93,225,214,.13), transparent 42%),
    var(--mkt-surface-band-2);
  border-color: color-mix(in srgb, var(--mkt-teal) 35%, var(--mkt-rule));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}

html[data-theme='dark'] .onboarding-upload-dropzone__icon,
[data-theme='dark'] .onboarding-upload-dropzone__icon,
html[data-theme='dark'] .upload-checklist li i,
[data-theme='dark'] .upload-checklist li i {
  background: color-mix(in srgb, var(--mkt-teal) 13%, var(--mkt-surface-band-1));
}

html[data-theme='dark'] .onboarding-upload-dropzone__title,
[data-theme='dark'] .onboarding-upload-dropzone__title,
html[data-theme='dark'] .upload-step__header h3,
[data-theme='dark'] .upload-step__header h3 {
  color: var(--mkt-text);
}

html[data-theme='dark'] .upload-checklist li,
[data-theme='dark'] .upload-checklist li {
  background:
    linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,0)),
    var(--mkt-surface-band-2);
}

/* Form controls: give inputs a matching lifted surface so they read as
   actual fields instead of holes punched in the page. */
html[data-theme='dark'] .modern-input,
[data-theme='dark'] .modern-input,
html[data-theme='dark'] .auth-form input,
[data-theme='dark'] .auth-form input,
html[data-theme='dark'] .auth-form select,
[data-theme='dark'] .auth-form select,
html[data-theme='dark'] .auth-form textarea,
[data-theme='dark'] .auth-form textarea {
  background: var(--mkt-surface-band-2);
  border-color: var(--mkt-rule);
  color: var(--mkt-text);
}
html[data-theme='dark'] .modern-input:focus,
[data-theme='dark'] .modern-input:focus,
html[data-theme='dark'] .auth-form input:focus,
[data-theme='dark'] .auth-form input:focus {
  background: var(--mkt-surface-band-1);
  border-color: var(--em-accent);
}
html[data-theme='dark'] .modern-input::placeholder,
[data-theme='dark'] .modern-input::placeholder {
  color: var(--mkt-text-muted);
}

/* Dev-only smoketest autofill button — only rendered in Development env */
.dev-autofill-btn {
    display: flex;
    align-items: center;
    gap: .4rem;
    width: 100%;
    padding: .45rem .9rem;
    font-size: .8rem;
    font-weight: 500;
    color: #92400e;
    background: #fef3c7;
    border: 1px dashed #f59e0b;
    border-radius: 8px;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
    justify-content: center;
    letter-spacing: .01em;
}
.dev-autofill-btn:hover {
    background: #fde68a;
    border-color: #d97706;
}
.dev-autofill-btn i { font-size: .85rem; }

/* Social buttons: same lift as cards, so the OAuth row doesn't disappear
   into the hero panel. */
html[data-theme='dark'] .social-btn,
[data-theme='dark'] .social-btn {
  background: var(--mkt-surface-band-1);
  border-color: var(--mkt-rule);
}
html[data-theme='dark'] .social-btn:hover:not(:disabled),
[data-theme='dark'] .social-btn:hover:not(:disabled) {
  background: var(--mkt-surface-band-2);
}

/* Wizard footer — its bar should feel like it's docked to the page, same
   band as the surrounding shell in dark. */
html[data-theme='dark'] .wizard-stage__footer,
[data-theme='dark'] .wizard-stage__footer {
  background: var(--mkt-surface-band-1);
  border-color: var(--mkt-rule);
}

/* Pills / chips / tracks on zebra sections need a band-2 so they don't
   disappear into the band-1 card beneath them. */
html[data-theme='dark'] .auth-pill,
[data-theme='dark'] .auth-pill,
html[data-theme='dark'] .timeline-node,
[data-theme='dark'] .timeline-node,
html[data-theme='dark'] .billing-toggle,
[data-theme='dark'] .billing-toggle {
  background: var(--mkt-surface-band-2);
}
