:root {
  --rd-blue: #0070ba;
  --rd-blue-dark: #003087;
  --rd-navy: #001c64;
  --rd-text: #16181d;
  --rd-muted: #667085;
  --rd-border: #e8ebef;
  --rd-soft: #eef4fa;
  --rd-cream: #f4efe9;
  --rd-pill: 999px;
  --rd-card: 24px;
  --header-h: 70px;
  --shadow-soft: 0 10px 30px rgba(16, 24, 40, 0.045);
  --shadow-hover: 0 14px 34px rgba(16, 24, 40, 0.07);
  --ease: 160ms ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--rd-text);
  background: #f7f5f2;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; }
.auth-lead:not(:has(.otp-email)) { display: none; }
input::placeholder, textarea::placeholder {
  color: transparent !important;
  opacity: 0 !important;
}

.cookie-banner {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  width: min(900px, calc(100% - 2rem)); background: #fff;
  border: 1px solid var(--rd-border); border-radius: 16px;
  box-shadow: var(--shadow-hover); padding: 14px 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; z-index: 3000;
}
.cookie-banner p { font-size: 0.875rem; color: var(--rd-muted); flex: 1; line-height: 1.45; }
.cookie-banner a { color: var(--rd-blue); text-decoration: underline; text-underline-offset: 2px; }
.cookie-buttons { display: flex; gap: 8px; flex-shrink: 0; }
.btn-cookie {
  font-size: 0.8125rem; font-weight: 600; padding: 10px 16px;
  border-radius: var(--rd-pill); cursor: pointer; border: 1px solid transparent;
}
.btn-decline { background: #fff; border-color: var(--rd-border); color: var(--rd-text); }
.btn-accept { background: var(--rd-blue-dark); color: #fff; }

.site-header {
  position: fixed; inset: 0 0 auto 0; height: var(--header-h);
  background: rgba(250,248,245,0.88); border-bottom: 1px solid rgba(232,235,239,0.85);
  backdrop-filter: saturate(140%) blur(12px); -webkit-backdrop-filter: saturate(140%) blur(12px);
  z-index: 1000;
}
.header-inner {
  max-width: 1160px; margin: 0 auto; padding: 0 24px; height: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.brand img { height: 32px; width: auto; }
.brand-name { font-size: 1.0625rem; font-weight: 700; color: var(--rd-navy); letter-spacing: -0.03em; }
.nav-main { display: flex; list-style: none; gap: 28px; align-items: center; }
.nav-main a {
  text-decoration: none; font-size: 0.9375rem; font-weight: 500; color: #3a3f47;
  transition: color var(--ease);
}
.nav-main a:hover, .nav-main a.is-active { color: var(--rd-blue); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.link-help {
  text-decoration: none; font-size: 0.9375rem; font-weight: 500; color: #3a3f47; margin-right: 4px;
}
.link-help:hover { color: var(--rd-blue); }
.menu-toggle { display: none; background: none; border: none; padding: 6px; cursor: pointer; }
.menu-toggle span { display: block; width: 20px; height: 2px; background: var(--rd-text); margin: 4px 0; border-radius: 2px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.9375rem; font-weight: 600; text-decoration: none;
  border-radius: var(--rd-pill); padding: 11px 20px; border: 1.5px solid transparent; cursor: pointer;
  transition: background var(--ease), color var(--ease), border-color var(--ease), transform var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn-outline { background: #fff; color: var(--rd-blue-dark); border-color: var(--rd-blue-dark); }
.btn-solid { background: var(--rd-blue-dark); color: #fff; }
.btn-soft { background: #eaf3fa; color: var(--rd-blue-dark); }
.btn-primary { background: var(--rd-blue); color: #fff; box-shadow: 0 6px 16px rgba(0,112,186,0.18); }
.btn-ghost { background: #fff; color: var(--rd-blue); border-color: rgba(0,112,186,0.45); }
.btn-lg { padding: 13px 24px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 820px; margin: 0 auto; padding: 0 24px; }

footer {
  background: linear-gradient(180deg, #f7f5f2 0%, #f0ece7 100%);
  border-top: 1px solid rgba(232,235,239,0.9);
  padding: 64px 24px 32px;
}
.footer-content {
  max-width: 1120px; margin: 0 auto;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px;
}
.footer-info h4, .footer-column h4 {
  font-size: 0.875rem; font-weight: 700; margin-bottom: 14px; letter-spacing: -0.01em;
}
.footer-info p { font-size: 0.8125rem; color: var(--rd-muted); margin-bottom: 10px; line-height: 1.55; }
.footer-column ul { list-style: none; }
.footer-column a {
  text-decoration: none; font-size: 0.875rem; color: var(--rd-muted);
  display: block; padding: 5px 0;
}
.footer-column a:hover { color: var(--rd-blue); }
.social-links { display: flex; gap: 8px; margin-top: 14px; }
.social-links a {
  width: 30px; height: 30px; border: 1px solid var(--rd-border); border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
  font-size: 0.65rem; font-weight: 700; color: var(--rd-muted);
}
.footer-bottom {
  max-width: 1120px; margin: 40px auto 0; padding-top: 22px; border-top: 1px solid #eef1f4;
  text-align: center; font-size: 0.75rem; color: #98a2b3;
}
.footer-legal { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 18px; margin: 12px 0; }
.footer-legal a { color: #98a2b3; text-decoration: none; }
.footer-legal a:hover { color: var(--rd-blue); }

/* Inner marketing pages */
.page-main { padding-top: var(--header-h); }
.page-hero {
  padding: 48px 24px 40px;
  background:
    radial-gradient(ellipse 55% 70% at 8% 15%, rgba(0,112,186,0.16), transparent 58%),
    radial-gradient(ellipse 50% 55% at 92% 8%, rgba(220,160,150,0.28), transparent 55%),
    linear-gradient(160deg, #e9eef8 0%, #f1ebe4 48%, #eef3fa 100%);
}
.breadcrumb {
  font-size: 0.8125rem; color: var(--rd-muted); margin-bottom: 18px;
}
.breadcrumb a { color: var(--rd-blue); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.page-kicker {
  display: inline-block; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--rd-blue); margin-bottom: 14px;
}
.page-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; letter-spacing: -0.04em;
  line-height: 1.08; max-width: 18ch; margin-bottom: 14px;
}
.page-hero .lead {
  font-size: 1.0625rem; color: var(--rd-muted); max-width: 52ch; margin-bottom: 24px;
}
.page-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.page-section { padding: 72px 0; }
.page-section.alt { background: linear-gradient(180deg, #eef4fa 0%, #f5f8fb 100%); }
.page-section.cream { background: linear-gradient(180deg, #f4efe9 0%, #f8f4ef 100%); }
.page-section h2 {
  font-size: clamp(1.5rem, 2.5vw, 2rem); font-weight: 700; letter-spacing: -0.03em;
  margin-bottom: 12px; line-height: 1.2;
}
.page-section .section-intro {
  color: var(--rd-muted); max-width: 62ch; margin-bottom: 28px; font-size: 1.02rem;
}
.page-section h3 {
  font-size: 1.125rem; font-weight: 700; letter-spacing: -0.02em; margin: 28px 0 10px;
}
.page-section p { color: var(--rd-muted); margin-bottom: 14px; max-width: 72ch; }
.page-section ul, .page-section ol { margin: 0 0 18px 1.2rem; color: var(--rd-muted); max-width: 72ch; }
.page-section li { margin-bottom: 8px; }

.prose-card {
  background: rgba(255,255,255,0.9); border: 1px solid var(--rd-border);
  border-radius: var(--rd-card); padding: 28px 26px; box-shadow: var(--shadow-soft);
  margin-bottom: 16px;
}
.prose-card h3 { margin-top: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

.steps-list { counter-reset: step; list-style: none; margin-left: 0; max-width: none; }
.steps-list li {
  position: relative; padding: 18px 18px 18px 64px; margin-bottom: 12px;
  background: #fff; border: 1px solid var(--rd-border); border-radius: 18px;
}
.steps-list li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 16px; top: 18px;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--rd-blue-dark); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 700;
}
.steps-list strong { display: block; color: var(--rd-text); margin-bottom: 4px; }

.data-table {
  width: 100%; border-collapse: collapse; background: #fff;
  border: 1px solid var(--rd-border); border-radius: 16px; overflow: hidden;
  margin: 16px 0 24px; font-size: 0.9375rem;
}
.data-table th, .data-table td {
  text-align: left; padding: 14px 16px; border-bottom: 1px solid #eef1f4;
}
.data-table th { background: var(--rd-soft); color: var(--rd-blue-dark); font-weight: 700; }
.data-table td { color: var(--rd-muted); }
.data-table tr:last-child td { border-bottom: none; }

.callout {
  background: var(--rd-soft); border-radius: 16px; padding: 20px 22px; margin: 20px 0;
  border: 1px solid rgba(0,112,186,0.12);
}
.callout strong { color: var(--rd-blue-dark); }
.disclaimer {
  font-size: 0.8125rem; color: #98a2b3; margin-top: 12px; max-width: 72ch;
}

.faq details {
  background: #fff; border: 1px solid var(--rd-border); border-radius: 14px;
  padding: 14px 18px; margin-bottom: 10px;
}
.faq summary {
  cursor: pointer; font-weight: 600; color: var(--rd-text); list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq details[open] summary { margin-bottom: 10px; color: var(--rd-blue-dark); }
.faq details p { margin: 0; font-size: 0.95rem; }

.cta-band {
  margin: 24px 0 0; padding: 36px 28px; border-radius: 24px;
  background: linear-gradient(135deg, #003087 0%, #0070ba 100%);
  color: #fff; text-align: center;
}
.cta-band h2 { color: #fff; margin-bottom: 10px; }
.cta-band p { color: rgba(255,255,255,0.88); margin: 0 auto 20px; max-width: 48ch; }
.cta-band .btn { margin: 0 6px; }
.cta-band .btn-primary { background: #fff; color: var(--rd-blue-dark); box-shadow: none; }
.cta-band .btn-soft { background: rgba(255,255,255,0.14); color: #fff; border-color: rgba(255,255,255,0.35); }

.media-wide {
  border-radius: 22px; overflow: hidden; margin: 24px 0;
  border: 1px solid rgba(255,255,255,0.8); box-shadow: var(--shadow-soft);
  aspect-ratio: 16 / 9; background: #d8dde6;
}
.media-wide img { width: 100%; height: 100%; object-fit: cover; }

.form-card {
  background: #fff; border: 1px solid var(--rd-border); border-radius: 20px;
  padding: 28px; max-width: 560px; box-shadow: var(--shadow-soft);
}
.form-card label { display: block; font-size: 0.875rem; font-weight: 600; margin-bottom: 6px; }
.form-card input, .form-card textarea, .form-card select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--rd-border);
  border-radius: 12px; margin-bottom: 16px; background: #fff;
}
.form-card textarea { min-height: 120px; resize: vertical; }

@media (max-width: 980px) {
  .nav-main { display: none; }
  .nav-main.open {
    display: flex; flex-direction: column; position: absolute; top: var(--header-h);
    left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--rd-border);
    padding: 16px 24px 18px; gap: 14px; align-items: flex-start;
  }
  .menu-toggle { display: block; }
  .link-help { display: none; }
  .nav-main.open .nav-only-mobile { display: block; }
  .footer-content { grid-template-columns: 1fr 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .page-hero h1 { max-width: none; }
}
@media (max-width: 560px) {
  .footer-content { grid-template-columns: 1fr; }
  .cookie-banner { flex-direction: column; align-items: stretch; }
  .header-inner { gap: 8px; }
  .header-actions { gap: 4px; flex-shrink: 0; }
  .header-actions .btn-solid {
    height: 32px;
    padding: 0 11px;
    font-size: 0.75rem;
  }
  .header-actions .btn-outline {
    display: inline-flex;
    height: 32px;
    padding: 0 8px;
    font-size: 0.75rem;
    font-weight: 600;
    background: none;
    border-color: transparent;
    color: var(--rd-blue-dark);
    box-shadow: none;
  }
  .header-actions .btn-outline:hover { background: var(--rd-soft); }
  .page-hero-actions { flex-direction: column; }
  .page-hero-actions .btn { width: 100%; }
  .cta-band .btn { display: block; width: 100%; margin: 8px 0; }
  .otp-input-group, .otp-row { gap: 5px; }
  .otp-digit, .otp-input {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
    max-width: 46px;
    height: 48px;
    font-size: 1.1rem;
  }
}
@media (max-width: 380px) {
  .header-inner { padding: 0 12px; gap: 6px; }
  .brand-name { display: none; }
}

.nav-only-mobile { display: none; }

/* ---------- Auth pages (login / register) ---------- */
.auth-page {
  min-height: 100svh;
  position: relative;
  background: #6d8496;
}
.auth-page::before {
  content: "";
  position: fixed; inset: 0; z-index: 0;
  background-image: url("https://images.unsplash.com/photo-1464822759023-fed622ff2c3b?auto=format&fit=crop&w=2400&q=90");
  background-size: cover;
  background-position: center 40%;
  background-repeat: no-repeat;
}
.auth-logo {
  position: absolute; top: 22px; left: 50%; transform: translateX(-50%);
  z-index: 20; display: flex; align-items: center; gap: 10px;
  text-decoration: none;
}
.auth-logo img { height: 28px; width: auto; }
.auth-logo span {
  font-size: 0.95rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: #16181d;
  text-shadow: 0 1px 8px rgba(255,255,255,0.65);
}
.auth-stage {
  position: relative; z-index: 1;
  min-height: 100svh;
  display: flex; align-items: center; justify-content: center;
  padding: 96px 20px 40px;
  background: none;
}
.auth-shell { width: min(440px, 100%); margin: 0 auto; }
.auth-shell.wide { width: min(520px, 100%); }
.auth-kicker { display: none; }
.auth-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(16, 24, 40, 0.18);
  padding: 28px 28px 22px;
}
.auth-card h1 {
  font-size: 1.125rem; font-weight: 500; letter-spacing: -0.02em;
  color: #667085; margin-bottom: 22px; text-align: left;
}
.auth-card .auth-lead {
  text-align: left; color: var(--rd-muted); font-size: 0.875rem;
  margin: -12px 0 22px;
}
.auth-card-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-top: 8px;
}
.auth-card-links {
  display: flex; flex-wrap: wrap; gap: 14px 18px;
  font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
}
.auth-card-links a { color: #98a2b3; text-decoration: none; }
.auth-card-links a:hover { color: var(--rd-blue); }
.auth-card-foot .submit-btn { width: auto; min-width: 132px; height: 44px; font-size: 0.8125rem; letter-spacing: 0.06em; text-transform: uppercase; }
.form-group { margin-bottom: 18px; }
.form-group label, .modal-label {
  display: block; font-size: 0.8125rem; font-weight: 600;
  color: var(--rd-text); margin-bottom: 8px; letter-spacing: -0.01em;
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="tel"],
.modal-input {
  width: 100%; height: 48px; padding: 0 16px;
  border: 1px solid var(--rd-border); border-radius: 12px;
  background: #fff; color: var(--rd-text);
  transition: border-color var(--ease);
}
.form-group input:focus, .modal-input:focus, .otp-digit:focus, .otp-input:focus {
  outline: none; border-color: var(--rd-blue);
}
.form-group small { display: block; margin-top: 6px; font-size: 0.75rem; color: var(--rd-muted); }
.field-wrap { position: relative; }
.field-wrap input { padding-right: 48px; }
.toggle-pw {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center;
  color: var(--rd-muted); cursor: pointer; background: none; border: none; padding: 0;
}
.form-options {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin: 6px 0 22px; font-size: 0.875rem;
}
.remember-me { display: flex; align-items: center; gap: 8px; color: var(--rd-muted); cursor: pointer; }
.forgot-link, .signup-link a, .back-link, .resend-link, .modal-back-link {
  color: var(--rd-blue); text-decoration: none; font-weight: 600;
}
.forgot-link:hover, .signup-link a:hover, .back-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.submit-btn, .btn-next, .modal-submit-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 100%;
  height: 50px; border: none; border-radius: 999px; cursor: pointer;
  background: var(--rd-blue); color: #fff; font-weight: 600; font-size: 1rem;
}
.submit-btn:hover, .btn-next:hover, .modal-submit-btn:hover { background: #005ea6; }
.auth-card-foot .submit-btn {
  width: auto; min-width: 132px; height: 44px;
  font-size: 0.8125rem; letter-spacing: 0.06em; text-transform: uppercase;
}
.submit-btn:disabled, .btn-next:disabled, .modal-submit-btn:disabled { opacity: 0.65; cursor: not-allowed; }
.btn-back {
  display: inline-flex; align-items: center; justify-content: center;
  height: 50px; padding: 0 22px; border-radius: 999px; cursor: pointer;
  background: #fff; color: var(--rd-blue-dark); border: 1px solid rgba(0, 48, 135, 0.32);
  font-weight: 600;
}
.form-buttons { display: flex; gap: 12px; margin-top: 8px; }
.form-buttons .btn-next { flex: 1; }
.divider {
  display: flex; align-items: center; gap: 14px; margin: 22px 0 16px; color: var(--rd-muted); font-size: 0.75rem;
}
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--rd-border); }
.signup-link { text-align: center; font-size: 0.9rem; color: var(--rd-muted); }
.security-notice {
  margin-top: 22px; padding: 14px 16px; border-radius: 12px;
  background: var(--rd-soft); color: var(--rd-muted); font-size: 0.8125rem; line-height: 1.5;
}
.security-notice strong { display: block; color: var(--rd-blue-dark); margin-bottom: 4px; }

.otp-container { display: none; }
.otp-container.active { display: block; }
.otp-channels {
  display: flex; gap: 8px; margin: 0 0 18px;
}
.otp-channels[hidden] { display: none !important; }
.otp-ch {
  flex: 1; height: 40px; border-radius: 999px;
  border: 1px solid var(--rd-border); background: #fff;
  color: var(--rd-text); font-weight: 600; font-size: 0.8125rem;
  cursor: pointer; font-family: inherit;
}
.otp-ch.active {
  background: var(--rd-blue); color: #fff; border-color: var(--rd-blue);
}
.otp-ch:disabled, .otp-ch.is-disabled {
  opacity: 0.45; cursor: not-allowed;
}
#otpSmsLine { font-weight: 600; color: var(--rd-text); }
.otp-input-group, .otp-row {
  display: flex; flex-wrap: nowrap; justify-content: center; align-items: center;
  gap: 8px; margin: 8px 0 22px;
}
.otp-digit, .otp-input {
  flex: 1 1 0; min-width: 0; width: 48px; max-width: 48px; height: 56px;
  text-align: center;
  font-size: 1.25rem; font-weight: 600;
  border: 1px solid var(--rd-border); border-radius: 12px; background: #fff;
}
.otp-actions { text-align: center; margin-top: 18px; font-size: 0.875rem; color: var(--rd-muted); }
.resend-btn {
  background: none; border: none; color: var(--rd-blue); font-weight: 600; cursor: pointer;
}
.alert-message, .modal-message {
  display: none; padding: 12px 14px; border-radius: 12px; margin-bottom: 16px; font-size: 0.875rem;
}
.alert-message.active, .modal-message.active { display: block; }
.alert-message.success, .modal-message.success { background: #eef8f1; color: #166534; }
.alert-message.error, .modal-message.error { background: #fdecec; color: #b42318; }

.auth-panel { display: none; }
.auth-panel.active { display: block; }
.modal-back-link { margin-top: 0; font-size: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; font-weight: inherit; }
.auth-card-foot .modal-submit-btn {
  width: auto; min-width: 132px; height: 44px;
  font-size: 0.8125rem; letter-spacing: 0.06em; text-transform: uppercase;
}

.progress-steps {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  margin-bottom: 28px; position: relative;
}
.progress-line { display: none; }
.step { text-align: center; }
.step-number {
  width: 28px; height: 28px; margin: 0 auto 8px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700;
  background: #eef2f6; color: var(--rd-muted);
}
.step.active .step-number, .step.completed .step-number {
  background: var(--rd-blue-dark); color: #fff;
}
.step-label { font-size: 0.75rem; color: var(--rd-muted); }
.step.active .step-label { color: var(--rd-text); font-weight: 600; }
.form-step { display: none; }
.form-step.active { display: block; }
.info-box {
  background: var(--rd-soft); border-radius: 14px; padding: 16px 18px;
  margin-bottom: 22px; font-size: 0.875rem; color: var(--rd-muted);
}
.info-box strong { color: var(--rd-text); }
.file-upload { position: relative; margin-bottom: 14px; }
.file-upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file-upload-label {
  display: block; border: 1px dashed var(--rd-border); border-radius: 14px;
  padding: 18px; text-align: center; cursor: pointer; background: #fafbfc;
  min-height: 52px;
}
.file-upload-label small { display: block; margin-top: 4px; }
.file-upload-label:hover { border-color: var(--rd-blue); }
.file-name { margin-top: 8px; font-size: 0.8125rem; color: var(--rd-blue-dark); }
.success-message { text-align: center; }
.success-message h2 { font-size: 1.5rem; font-weight: 600; margin-bottom: 10px; }
.success-message > p { color: var(--rd-muted); margin-bottom: 20px; }

.auth-front-static { min-height: 100svh; }

/* Glass card shared by overlay + standalone on small/medium screens */
.login-overlay .auth-front.is-active,
body.auth-page .auth-front-static {
  scroll-padding: 20px;
  overscroll-behavior: contain;
}

/* ---------- Standalone login.html / register.html: phone glass card ---------- */
@media (max-width: 720px) {
  body.auth-page {
    background: #000;
    overflow: hidden;
    min-height: 100svh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(12px, env(safe-area-inset-top)) 16px max(12px, env(safe-area-inset-bottom));
  }
  body.auth-page::before {
    inset: 0;
    width: auto;
    height: auto;
    background-size: cover;
    background-position: center 40%;
  }
  body.auth-page .auth-front-static {
    width: 100%;
    max-width: 420px;
    max-height: calc(100svh - 24px);
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: rgba(247, 245, 242, 0.7);
    backdrop-filter: blur(22px) saturate(1.15);
    -webkit-backdrop-filter: blur(22px) saturate(1.15);
    border-radius: 22px;
    box-shadow: 0 18px 50px rgba(16, 24, 40, 0.22);
    min-height: 0;
  }
  body.auth-page .auth-logo {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    padding: 16px 16px 0;
    justify-content: flex-start;
  }
  body.auth-page .auth-logo img { height: 24px; }
  body.auth-page .auth-logo span {
    color: #16181d;
    text-shadow: none;
    font-size: 0.8125rem;
  }
  body.auth-page .auth-stage {
    min-height: 0;
    margin: 0;
    width: 100%;
    padding: 8px 16px 16px;
    align-items: stretch;
    justify-content: flex-start;
    background: transparent;
  }
  body.auth-page .auth-shell,
  body.auth-page .auth-shell.wide { width: 100%; }
  body.auth-page .auth-card {
    background: transparent;
    box-shadow: none;
    min-height: 0;
    padding: 4px 0 8px;
    border-radius: 0;
  }
  body.auth-page .auth-card h1 {
    margin-bottom: 14px;
    font-size: 1.375rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    color: #16181d;
  }
  body.auth-page .auth-card .auth-lead { margin: -6px 0 16px; font-size: 0.875rem; }
  body.auth-page .form-group { margin-bottom: 14px; }
  body.auth-page .form-group label,
  body.auth-page .modal-label {
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #667085;
  }
  body.auth-page .form-group input[type="text"],
  body.auth-page .form-group input[type="email"],
  body.auth-page .form-group input[type="password"],
  body.auth-page .form-group input[type="tel"],
  body.auth-page .modal-input { height: 48px; border-radius: 12px; }
  body.auth-page .auth-card-foot {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 12px;
    margin-top: 8px;
  }
  body.auth-page .auth-card-foot .submit-btn,
  body.auth-page .auth-card-foot .modal-submit-btn {
    width: 100%;
    min-width: 0;
    height: 50px;
    font-size: 0.875rem;
  }
  body.auth-page .submit-btn,
  body.auth-page .btn-next,
  body.auth-page .btn-back {
    min-height: 50px;
    width: 100%;
  }
  body.auth-page .form-buttons {
    flex-direction: column-reverse;
  }
  body.auth-page .auth-card-links {
    letter-spacing: 0;
    text-transform: none;
    font-size: 0.875rem;
    justify-content: center;
  }
  body.auth-page .auth-card-links a { white-space: nowrap; }
  body.auth-page .progress-steps { gap: 4px; margin-bottom: 16px; }
  body.auth-page .step-label { font-size: 0.625rem; line-height: 1.2; }
  body.auth-page .otp-digit,
  body.auth-page .otp-input {
    width: auto;
    max-width: 48px;
    height: 48px;
    font-size: 1.125rem;
  }
}

@media (max-width: 390px) {
  body.auth-page { padding: max(10px, env(safe-area-inset-top)) 16px max(10px, env(safe-area-inset-bottom)); }
  body.auth-page .auth-front-static {
    max-height: calc(100svh - 20px);
    max-height: calc(100dvh - 20px);
  }
  body.auth-page .auth-logo { padding: 16px 16px 0; }
  body.auth-page .auth-stage { padding: 6px 16px 16px; }
  body.auth-page .auth-card h1 { font-size: 1.25rem; margin-bottom: 12px; }
  body.auth-page .step-number { width: 24px; height: 24px; margin-bottom: 4px; font-size: 0.6875rem; }
  body.auth-page .step-label { font-size: 0.5625rem; }
  body.auth-page .otp-digit,
  body.auth-page .otp-input { height: 44px; font-size: 1rem; border-radius: 10px; }
}

@media (max-width: 720px) and (orientation: landscape) {
  body.auth-page {
    padding: 8px 16px;
    align-items: stretch;
  }
  body.auth-page .auth-front-static {
    max-width: min(520px, 100%);
    max-height: calc(100svh - 16px);
    max-height: calc(100dvh - 16px);
    margin: auto;
  }
}

/* ---------- Standalone tablet: glass card, not the 54% split ---------- */
@media (min-width: 721px) and (max-width: 1024px) {
  body.auth-page {
    background: #000;
    overflow: hidden;
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(20px, env(safe-area-inset-top)) 24px max(20px, env(safe-area-inset-bottom));
  }
  body.auth-page::before {
    inset: 0;
    width: auto;
    height: auto;
    background-size: cover;
    background-position: center;
  }
  body.auth-page .auth-front-static {
    width: min(520px, 86vw);
    max-height: calc(100svh - 48px);
    max-height: calc(100dvh - 48px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: rgba(247, 245, 242, 0.7);
    backdrop-filter: blur(22px) saturate(1.15);
    -webkit-backdrop-filter: blur(22px) saturate(1.15);
    border-radius: 22px;
    box-shadow: 0 18px 50px rgba(16, 24, 40, 0.2);
    min-height: 0;
  }
  body.auth-page .auth-logo {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    padding: 24px 28px 0;
  }
  body.auth-page .auth-logo span { color: #16181d; text-shadow: none; }
  body.auth-page .auth-stage {
    min-height: 0;
    margin: 0;
    width: 100%;
    padding: 16px 28px 28px;
    background: transparent;
  }
  body.auth-page .auth-shell,
  body.auth-page .auth-shell.wide { width: 100%; }
  body.auth-page .auth-card {
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
  }
  body.auth-page .auth-card h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--rd-text);
  }
  body.auth-page .submit-btn,
  body.auth-page .btn-next,
  body.auth-page .btn-back,
  body.auth-page .toggle-pw,
  body.auth-page .file-upload-label {
    min-height: 44px;
  }
}

@media (min-width: 721px) and (max-width: 1024px) and (orientation: landscape) {
  body.auth-page {
    justify-content: flex-end;
    padding: 20px 28px 20px 20px;
  }
  body.auth-page .auth-front-static { margin-right: 0; }
}

/* ---------- Standalone desktop: photo | form split (approved) ---------- */
@media (min-width: 1025px) {
  body.auth-page { background: #f7f5f2; }
  body.auth-page::before {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 46%;
    right: auto;
    height: auto;
    background-size: cover;
    background-position: center;
  }
  body.auth-page .auth-front-static {
    min-height: 100svh;
    background: none;
    box-shadow: none;
    border-radius: 0;
    overflow: visible;
    max-width: none;
    width: auto;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  body.auth-page .auth-logo {
    left: calc(46% + 27%);
    top: 28px;
  }
  body.auth-page .auth-stage {
    margin-left: 46%;
    width: 54%;
    min-height: 100svh;
    align-items: center;
    justify-content: center;
    padding: 88px 48px 40px;
    background: #f7f5f2;
  }
  body.auth-page .auth-shell,
  body.auth-page .auth-shell.wide { width: min(400px, 100%); }
  body.auth-page .auth-card {
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
  }
  body.auth-page .auth-card h1 {
    color: var(--rd-text);
    font-size: 1.75rem;
    font-weight: 500;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
  }
  body.auth-page .auth-card .auth-lead {
    margin: 0 0 28px;
    font-size: 0.9375rem;
  }
  body.auth-page .form-group { margin-bottom: 18px; }
  body.auth-page .auth-card-links {
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.875rem;
  }
}

/* ---------- Overlay: full-bleed photo, glass panel slides from the right ---------- */
.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: none;
  overflow: hidden;
  background: #000;
}
.login-overlay.is-open,
.login-overlay.is-leaving { display: block; }
.login-overlay .auth-page {
  min-height: 100svh;
  min-height: 100dvh;
  background: none;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.login-overlay .auth-page::before {
  position: fixed;
  inset: 0;
  width: auto;
  height: auto;
  transform: none;
  background-size: cover;
  background-position: center;
}
.login-overlay .auth-front {
  position: relative;
  z-index: 2;
  display: none;
}
.login-overlay.is-open .auth-front.is-active {
  display: block;
  animation: loginPanelIn 0.65s cubic-bezier(0.33, 0.05, 0.2, 1) both;
  background: rgba(247, 245, 242, 0.7);
  backdrop-filter: blur(22px) saturate(1.15);
  -webkit-backdrop-filter: blur(22px) saturate(1.15);
}
.login-overlay.is-leaving .auth-front.is-active {
  display: block;
  animation: loginPanelOut 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  background: rgba(247, 245, 242, 0.7);
  backdrop-filter: blur(22px) saturate(1.15);
  -webkit-backdrop-filter: blur(22px) saturate(1.15);
}
.login-overlay .auth-stage {
  margin-left: 0;
  width: 100%;
  background: transparent;
}
.login-overlay .auth-card {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  min-height: 0;
  padding: 0;
}
.login-overlay .auth-card h1 {
  color: var(--rd-text);
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.03em;
}
.login-overlay-close {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  z-index: 30;
  height: 40px;
  min-width: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #16181d;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.16);
}
.login-overlay-close:hover { background: #fff; }
html.login-overlay-open,
html.login-overlay-open body { overflow: hidden; }
@keyframes loginPanelIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
@keyframes loginPanelOut {
  from { transform: translateX(0); }
  to { transform: translateX(100%); }
}

/* Overlay phone: centered glass card */
@media (max-width: 720px) {
  .login-overlay .auth-page {
    align-items: center;
    justify-content: center;
    padding:
      max(12px, env(safe-area-inset-top))
      16px
      max(12px, env(safe-area-inset-bottom));
  }
  .login-overlay .auth-front.is-active {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    width: 100%;
    max-width: 420px;
    max-height: calc(100svh - 24px);
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 22px;
    box-shadow: 0 18px 50px rgba(16, 24, 40, 0.22);
  }
  .login-overlay .auth-card {
    background: transparent;
    box-shadow: none;
    min-height: 0;
    padding: 4px 0 8px;
    border-radius: 0;
  }
  .login-overlay .auth-card h1 {
    font-size: 1.375rem;
    font-weight: 600;
    color: #16181d;
    margin-bottom: 14px;
  }
  .login-overlay .auth-logo {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    padding: 16px 88px 0 16px;
    justify-content: flex-start;
  }
  .login-overlay .auth-logo img { height: 24px; }
  .login-overlay .auth-logo span {
    color: #16181d;
    text-shadow: none;
    font-size: 0.8125rem;
  }
  .login-overlay .auth-stage {
    min-height: 0;
    padding: 8px 16px 16px;
    align-items: stretch;
    justify-content: flex-start;
  }
  .login-overlay .auth-shell,
  .login-overlay .auth-shell.wide { width: 100%; }
  .login-overlay .login-overlay-close {
    top: 10px;
    right: 10px;
    height: 44px;
    padding: 0 16px;
  }
  .login-overlay .auth-card-foot {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 12px;
  }
  .login-overlay .auth-card-foot .submit-btn,
  .login-overlay .auth-card-foot .modal-submit-btn,
  .login-overlay .submit-btn,
  .login-overlay .btn-next {
    width: 100%;
    min-width: 0;
    height: 50px;
  }
  .login-overlay .btn-back {
    width: 100%;
    min-height: 50px;
  }
  .login-overlay .form-group { margin-bottom: 14px; }
  .login-overlay .otp-input-group,
  .login-overlay .otp-row {
    gap: clamp(4px, 1.6vw, 8px);
    justify-content: space-between;
  }
  .login-overlay .otp-digit,
  .login-overlay .otp-input {
    width: auto;
    max-width: 48px;
    height: 48px;
    font-size: 1.125rem;
  }
  .login-overlay .progress-steps {
    gap: 4px;
    margin-bottom: 16px;
  }
  .login-overlay .step-label { font-size: 0.625rem; line-height: 1.2; }
  .login-overlay .form-buttons { flex-direction: column-reverse; }
  .login-overlay .form-buttons .btn-back,
  .login-overlay .form-buttons .btn-next { width: 100%; }
  .login-overlay .toggle-pw {
    width: 44px;
    height: 44px;
    right: 4px;
  }
  .login-overlay .file-upload-label {
    min-height: 56px;
    padding: 16px 14px;
  }
}

/* Overlay small phone (iPhone SE) */
@media (max-width: 390px) {
  .login-overlay .auth-page {
    padding:
      max(10px, env(safe-area-inset-top))
      16px
      max(10px, env(safe-area-inset-bottom));
  }
  .login-overlay .auth-front.is-active {
    max-height: calc(100svh - 20px);
    max-height: calc(100dvh - 20px);
  }
  .login-overlay .auth-logo { padding: 16px 84px 0 16px; }
  .login-overlay .auth-stage { padding: 6px 16px 16px; }
  .login-overlay .auth-card h1 { font-size: 1.25rem; margin-bottom: 12px; }
  .login-overlay .step-number { width: 24px; height: 24px; margin-bottom: 4px; font-size: 0.6875rem; }
  .login-overlay .step-label { font-size: 0.5625rem; }
  .login-overlay .otp-digit,
  .login-overlay .otp-input { height: 44px; font-size: 1rem; border-radius: 10px; }
}

/* Overlay phone landscape */
@media (max-width: 720px) and (orientation: landscape) {
  .login-overlay .auth-page {
    padding: 8px 16px;
    align-items: stretch;
  }
  .login-overlay .auth-front.is-active {
    max-width: min(520px, 100%);
    max-height: calc(100svh - 16px);
    max-height: calc(100dvh - 16px);
    margin: auto;
  }
  .login-overlay .auth-logo { padding-top: 12px; }
  .login-overlay .auth-stage { padding-bottom: 12px; }
}

/* Overlay tablet: glass card, not full-height column */
@media (min-width: 721px) and (max-width: 1024px) {
  .login-overlay .auth-page {
    align-items: center;
    justify-content: center;
    padding:
      max(20px, env(safe-area-inset-top))
      24px
      max(20px, env(safe-area-inset-bottom));
  }
  .login-overlay .auth-front.is-active {
    width: min(520px, 86vw);
    margin: 0;
    max-height: calc(100svh - 48px);
    max-height: calc(100dvh - 48px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 22px;
    box-shadow: 0 18px 50px rgba(16, 24, 40, 0.2);
  }
  .login-overlay .auth-logo {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    padding: 24px 92px 0 28px;
  }
  .login-overlay .auth-logo span { color: #16181d; text-shadow: none; }
  .login-overlay .auth-stage {
    min-height: 0;
    padding: 16px 28px 28px;
  }
  .login-overlay .auth-shell,
  .login-overlay .auth-shell.wide { width: 100%; }
  .login-overlay .auth-card {
    background: transparent;
    box-shadow: none;
    min-height: 0;
    padding: 0;
  }
  .login-overlay .login-overlay-close {
    height: 44px;
    top: 16px;
    right: 16px;
  }
  .login-overlay .toggle-pw,
  .login-overlay .submit-btn,
  .login-overlay .btn-next,
  .login-overlay .btn-back {
    min-height: 44px;
  }
  .login-overlay .file-upload-label { min-height: 56px; padding: 16px 14px; }
}

@media (min-width: 721px) and (max-width: 1024px) and (orientation: landscape) {
  .login-overlay .auth-page {
    justify-content: flex-end;
    padding: 20px 28px 20px 20px;
  }
}

/* Overlay desktop large: approved right-side 480px card — do not restyle */
@media (min-width: 1025px) {
  .login-overlay .auth-front.is-active {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    width: min(480px, calc(100% - 64px));
    margin: 28px 32px 28px 0;
    max-height: calc(100svh - 56px);
    overflow-y: auto;
    border-radius: 22px;
    box-shadow: 0 18px 50px rgba(16, 24, 40, 0.18);
  }
  .login-overlay .auth-logo {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    padding: 26px 32px 0;
  }
  .login-overlay .auth-stage {
    min-height: 0;
    padding: 20px 32px 32px;
  }
  .login-overlay .auth-card h1 {
    font-size: 1.75rem;
    font-weight: 500;
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-overlay.is-open .auth-front.is-active,
  .login-overlay.is-leaving .auth-front.is-active {
    animation: none;
  }
}
