:root {
  /* BethelFlow design tokens, light and dark, from globals.css */
  color-scheme: light dark;
  --bg: light-dark(hsl(0, 0%, 100%), hsl(224, 10%, 7%));
  --text: light-dark(hsl(20, 14.3%, 4.1%), hsl(0, 0%, 98%));
  --text-soft: light-dark(hsl(25, 5.3%, 44.7%), hsl(240, 5%, 64.9%));
  --muted: light-dark(hsl(25, 5.3%, 44.7%), hsl(240, 5%, 64.9%));
  --border: light-dark(hsl(20, 5.9%, 90%), hsl(224, 5%, 18%));
  --field: light-dark(hsl(0, 0%, 100%), hsl(224, 10%, 9%));
  --primary: hsl(221, 83%, 53%);
  --primary-hover: hsl(221, 83%, 47%);
  --primary-ink: light-dark(hsl(60, 9.1%, 97.8%), hsl(0, 0%, 100%));
  --ring: hsl(221, 83%, 53%);
  --ring-soft: light-dark(hsla(221, 83%, 53%, 0.22), hsla(221, 83%, 60%, 0.35));
  --danger-soft: light-dark(hsla(0, 84%, 45%, 0.18), hsla(0, 70%, 60%, 0.3));
  --link: light-dark(hsl(221, 83%, 53%), hsl(221, 83%, 68%));
  --danger-bg: light-dark(hsl(0, 84.2%, 97%), hsla(0, 62.8%, 50%, 0.15));
  --danger-border: light-dark(hsl(0, 84.2%, 82%), hsla(0, 62.8%, 60%, 0.35));
  --danger-text: light-dark(hsl(0, 84.2%, 40%), hsl(0, 62.8%, 75%));
  --ok-bg: light-dark(hsl(142, 76%, 97%), hsla(142, 76%, 36%, 0.15));
  --ok-border: light-dark(hsl(142, 76%, 70%), hsla(142, 76%, 36%, 0.4));
  --ok-text: light-dark(hsl(142, 76%, 28%), hsl(142, 76%, 65%));
  --wordmark: light-dark(#231f20, hsl(0, 0%, 98%));
  --radius: 0.5rem;
  --panel-bg: light-dark(hsl(224, 10%, 7%), hsl(224, 10%, 5%));
}

/* The product's chosen theme beats the OS preference. */
:root[data-theme="dark"] { color-scheme: dark; }
:root[data-theme="light"] { color-scheme: light; }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font: 400 14px/1.6 "Lato", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

[hidden] { display: none !important; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, .link-btn:focus-visible { outline: none; border-radius: 3px; box-shadow: 0 0 0 3px var(--ring-soft); }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ── Layout ── */
.shell { display: flex; min-height: 100vh; }
@supports (min-height: 100dvh) { .shell { min-height: 100dvh; } }

.pane {
  width: 100%;
  display: flex;
  flex-direction: column;
  padding: 32px 24px;
}
@media (min-width: 768px) { .pane { width: 50%; padding: 40px 40px; } }
@media (min-width: 1024px) { .pane { padding: 40px 64px; } }

/* ── Brand lockup ── */
.lockup-row { display: flex; align-items: center; justify-content: space-between; margin: 0 auto 32px; max-width: 448px; width: 100%; }
.lockup { margin: 0; max-width: 100%; display: flex; align-items: center; gap: 12px; }
.lockup-service {
  padding-left: 12px; border-left: 1px solid var(--border);
  font-size: 15px; font-weight: 400; color: var(--text-soft); line-height: 24px;
}
.lockup-home { display: block; border-radius: 4px; transition: opacity .15s; }
.lockup-home:hover { opacity: .8; }
.brand-lockup { height: 40px; width: auto; display: block; }
.brand-lockup path[fill="#231f20"] { fill: var(--wordmark); }
/* FaithFrames' artwork has no padding in its viewBox, so it reads larger at the same height. */
.brand-lockup--tight { height: 31px; margin: 4px 0; }

/* ── Language switcher button ── */
.lang-btn {
  height: 40px; width: 40px; padding: 0; margin: 0;
  background: transparent; border: 0; border-radius: var(--radius);
  color: var(--text-soft); cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  flex-shrink: 0; transition: color 0.15s, background 0.15s;
}
.lang-btn:hover:not(:disabled) { background: var(--border); color: var(--text); }
.lang-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring-soft); }

/* ── Language dialog ── */
.lang-dialog {
  position: fixed; inset: 0; z-index: 100; margin: auto;
  width: min(480px, calc(100vw - 32px));
  max-height: min(520px, calc(100vh - 64px));
  padding: 0; border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  background: var(--bg); color: var(--text);
  box-shadow: 0 20px 60px rgba(0,0,0,0.18);
  display: flex; flex-direction: column; overflow: hidden;
}
.lang-dialog::backdrop { background: rgba(0,0,0,0.45); }
.lang-dialog:not([open]) { display: none; }

.lang-inner { display: flex; flex-direction: column; height: 100%; }

.lang-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 0;
}
.lang-heading { font-size: 13px; font-weight: 600; color: var(--text-soft); text-transform: uppercase; letter-spacing: 0.04em; }
.lang-close {
  height: 28px; width: 28px; padding: 0; background: transparent; border: 0;
  border-radius: 6px; color: var(--text-soft); cursor: pointer; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.lang-close:hover { background: var(--border); color: var(--text); }

.lang-search {
  margin: 10px 12px 6px; height: 38px; width: calc(100% - 24px);
  padding: 0 12px; font: inherit; font-size: 14px;
  color: var(--text); background: var(--field);
  border: 1px solid var(--border); border-radius: calc(var(--radius) - 2px);
  outline: none; transition: box-shadow 0.15s;
}
.lang-search:focus-visible { border-color: var(--ring); box-shadow: 0 0 0 3px var(--ring-soft); }

.lang-empty { padding: 20px 16px; font-size: 13.5px; color: var(--text-soft); text-align: center; }

.lang-list { list-style: none; overflow-y: auto; padding: 4px 6px 8px; flex: 1; }

.lang-item {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 10px; border-radius: calc(var(--radius) - 2px);
  cursor: pointer; font-size: 14px; transition: background 0.1s;
  color: var(--text); user-select: none;
}
.lang-item:hover, .lang-item[aria-current="true"] { background: var(--border); text-decoration: none; }
.lang-item:focus-visible { outline: none; box-shadow: inset 0 0 0 1px var(--ring), 0 0 0 3px var(--ring-soft); }
.lang-item__flag { font-size: 18px; line-height: 1; flex-shrink: 0; }
.lang-item__name { flex: 1; }
.lang-item__check { color: var(--primary); flex-shrink: 0; }
.lang-item__check svg { display: block; }

/* ── Form container ── */
/* Top-aligned with a fixed offset, so feedback appearing below never shifts the heading. */
.form-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 448px;
  margin: 0 auto;
  padding-top: 8px;
}
@media (min-width: 768px) { .form-wrap { padding-top: clamp(24px, 14vh, 150px); } }

h1 {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--text);
  margin-bottom: 8px;
}
@media (min-width: 768px) { h1 { font-size: 30px; } }

.lede {
  font-size: 14px;
  color: var(--text-soft);
  margin-bottom: 28px;
}

/* ── Fields ── */
form { display: flex; flex-direction: column; gap: 20px; }

.field { display: flex; flex-direction: column; gap: 6px; }

.field-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.field-label { font-size: 14px; font-weight: 500; color: var(--text); line-height: 1; }

.field-link { font-size: 13px; color: var(--text-soft); transition: color 0.15s; }
.field-link:hover { color: var(--text); text-decoration: underline; }

.field-hint { font-size: 12.5px; color: var(--text-soft); }
.field-error { font-size: 13px; line-height: 1.4; color: var(--danger-text); }
input[aria-invalid="true"] { border-color: var(--danger-text); }
input[aria-invalid="true"]:focus-visible { border-color: var(--danger-text); box-shadow: 0 0 0 3px var(--danger-soft); }
.name-row { display: grid; gap: 20px; }
@media (min-width: 480px) { .name-row { grid-template-columns: 1fr 1fr; gap: 12px; } }

input {
  height: 40px;
  width: 100%;
  padding: 0 12px;
  font: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--field);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
  outline: none;
  transition: box-shadow 0.15s, border-color 0.15s;
}
input::placeholder { color: var(--muted); opacity: 0.7; }
input:focus-visible {
  border-color: var(--ring);
  box-shadow: 0 0 0 3px var(--ring-soft);
}

/* ── Button ── */
button {
  height: 40px;
  width: 100%;
  padding: 0 16px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--primary-ink);
  background: var(--primary);
  border: 0;
  border-radius: calc(var(--radius) - 2px);
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s, transform 0.08s, opacity 0.15s;
}
button:hover:not(:disabled) { background: var(--primary-hover); }
button:active:not(:disabled) { transform: scale(0.975); background: var(--primary-hover); }
button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--ring-soft);
}
button:disabled { opacity: 0.7; cursor: not-allowed; }
@keyframes btn-spin { to { transform: rotate(360deg); } }
button[aria-busy="true"] { position: relative; padding-left: 2.25rem; }
button[aria-busy="true"]::before {
  content: ""; position: absolute; left: 0.875rem; top: calc(50% - 6.5px);
  width: 13px; height: 13px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff;
  animation: btn-spin 0.65s linear infinite;
}

/* ── Footer & legal ── */
.footer { margin-top: 20px; font-size: 13.5px; text-align: center; color: var(--text-soft); width: 100%; }
.footer a { font-weight: 500; color: var(--text); }

.legal {
  max-width: 448px; width: 100%; margin: 24px auto 0;
  font-size: 11.5px; text-align: center; color: var(--muted);
}
.legal a { color: var(--muted); text-decoration: underline; }

/* ── Right panel ── */
.panel { display: none; }

@media (min-width: 768px) {
  .panel {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--panel-bg);
    margin: 12px 12px 12px 0;
    border-radius: 20px;
    isolation: isolate;
  }
}

.panel-glow-1 {
  position: absolute;
  width: 500px; height: 500px;
  top: -140px; left: 50%; transform: translateX(-50%);
  background: radial-gradient(circle, rgba(37,99,235,0.32) 0%, transparent 65%);
  pointer-events: none; z-index: 0;
}
.panel-glow-2 {
  position: absolute;
  width: 300px; height: 300px;
  bottom: 30px; right: -60px;
  background: radial-gradient(circle, rgba(99,102,241,0.2) 0%, transparent 65%);
  pointer-events: none; z-index: 0;
}

.panel-art {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 16px 0;
  z-index: 1;
}
.panel-svg { width: 100%; max-width: 460px; height: auto; }

.panel-divider { height: 1px; background: rgba(255,255,255,0.08); margin: 0 40px; position: relative; z-index: 1; }

.panel-copy { position: relative; padding: 28px 44px 44px; z-index: 1; }

.panel-headline {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.025em;
  color: #ffffff;
  margin-bottom: 8px;
  max-width: 22rem;
}
.panel-sub {
  font-size: 13.5px;
  color: rgba(255,255,255,0.55);
  line-height: 1.65;
  max-width: 22rem;
}

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

/* ── Email step and provider stack ── */
.email-step { display: flex; flex-direction: column; gap: 20px; }
.providers { display: flex; flex-direction: column; gap: 10px; }
.provider-btn {
  position: relative; height: 40px; display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 14px; font-weight: 500; color: var(--text); background: var(--field);
  border: 1px solid light-dark(var(--border), hsl(224, 5%, 26%)); border-radius: calc(var(--radius) - 2px);
  transition: background 0.15s, box-shadow 0.15s;
}
.provider-btn:hover { background: var(--border); text-decoration: none; }
.provider-btn:focus-visible { outline: none; border-color: var(--ring); box-shadow: 0 0 0 3px var(--ring-soft); }
.provider-btn svg { flex-shrink: 0; }
.last-used {
  position: absolute; right: 10px; padding: 2px 6px; border-radius: 4px;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--primary); background: light-dark(hsl(221, 83%, 95%), hsl(221, 60%, 18%));
}
.divider { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--muted); }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* ── Email-first step transitions ── */
.back-btn {
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  height: auto;
  width: auto;
  box-shadow: none;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-soft);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.15s;
}
.back-btn:hover:not(:disabled) { background: none; color: var(--text); }
.back-btn:active:not(:disabled) { transform: none; }

.step-lede {
  font-size: 13.5px;
  color: var(--text-soft);
  margin: -12px 0 4px;
  word-break: break-all;
}

.turnstile:empty { display: none; }

/* ── Password visibility toggle ── */
.pwd-wrap { position: relative; }
.pwd-wrap input { padding-right: 40px; }
.pwd-toggle {
  position: absolute;
  right: 1px; top: 1px; bottom: 1px;
  width: 38px;
  height: auto;
  padding: 0;
  margin: 0;
  background: transparent;
  border: 0;
  border-radius: 0 calc(var(--radius) - 3px) calc(var(--radius) - 3px) 0;
  box-shadow: none;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
  transition: color 0.15s;
}
.pwd-toggle:hover:not(:disabled) { background: transparent; color: var(--text-soft); }
.pwd-toggle:active:not(:disabled) { transform: none; }
.pwd-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--ring-soft);
}

/* ── Form-level feedback ── */
.form-error { font-size: 13.5px; line-height: 1.45; color: var(--danger-text); margin: -6px 0 -4px; }
.link-btn {
  display: inline; width: auto; height: auto; padding: 0; margin: 0; border: 0; background: none;
  font: inherit; font-weight: 600; color: var(--link); cursor: pointer; text-decoration: underline;
  text-underline-offset: 2px;
}
.link-btn:hover:not(:disabled) { background: none; color: var(--link); }
.link-btn:disabled { opacity: 1; color: var(--muted); text-decoration: none; cursor: default; }

/* ── Email chip on the password and create steps ── */
.email-chip {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 12px; border: 1px solid var(--border); border-radius: calc(var(--radius) - 2px);
  font-size: 14px; background: var(--field);
}
.email-chip__value { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.email-chip .link-btn { font-size: 13px; flex-shrink: 0; }

/* ── Notice: check your inbox, signed in, verified ── */
.notice-icon {
  width: 44px; height: 44px; margin-bottom: 20px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: var(--primary); background: light-dark(hsl(221, 83%, 95%), hsl(221, 60%, 16%));
}
.notice { display: flex; flex-direction: column; gap: 16px; }
.notice-resend, .notice-back { font-size: 13.5px; color: var(--text-soft); display: flex; gap: 8px; flex-wrap: wrap; }
.lede strong { color: var(--text); font-weight: 700; word-break: break-all; }
h1:focus { outline: none; }

a.button {
  display: flex; align-items: center; justify-content: center; height: 40px; padding: 0 16px;
  font-size: 14px; font-weight: 500; color: var(--primary-ink); background: var(--primary);
  border-radius: calc(var(--radius) - 2px); text-decoration: none;
}
a.button:hover { background: var(--primary-hover); text-decoration: none; }
a.button:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring-soft); }

/* ── Verify progress ── */
.progress { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-soft); }
.spinner {
  width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid var(--border); border-top-color: var(--primary); animation: btn-spin 0.65s linear infinite;
}
.intro { font-size: 14px; color: var(--text-soft); margin-bottom: 16px; }
.flow { display: flex; flex-direction: column; }

/* Honeypot: off-screen rather than display:none, which some bots skip. */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
