
*, *::before, *::after { box-sizing: border-box; }
:root {
  color-scheme: light;
  /* The SPA self-hosts Roboto and Space Grotesk through `@fontsource-variable/*`; these
     pages ship no font files, so the families only apply when installed locally and the
     generic stacks take over otherwise. Roles match the SPA: Roboto for UI, Space Grotesk
     for headings and the wordmark. */
  --ark-font-ui: 'Roboto Variable', Roboto, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ark-font-heading: 'Space Grotesk Variable', 'Space Grotesk', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  /* Tailwind v4 derives this radius scale from the base token. The auth pages link the
     token stylesheet but not Tailwind's theme layer, so the derived values are declared
     here to keep the SPA's rounded corners on the server-rendered pages. */
  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);
  --radius-2xl: calc(var(--radius) + 8px);
}
.dark { color-scheme: dark; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100svh;
  background-color: var(--surface-bg);
  color: var(--foreground);
  font-family: var(--ark-font-ui);
  -webkit-font-smoothing: antialiased;
}
.ark-auth__wordmark,
.ark-auth__heading h1,
.ark-auth__error h1 { font-family: var(--ark-font-heading); }
.ark-auth {
  display: grid;
  min-height: 100svh;
  place-items: center;
  padding: 2.5rem 1rem;
  background-image:
    linear-gradient(color-mix(in srgb, var(--brand-accent) 5%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--brand-accent) 5%, transparent) 1px, transparent 1px);
  background-size: 28px 28px, 28px 28px;
}
.ark-auth__panel { width: 100%; max-width: 28rem; }
.ark-locale-bar {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 20;
}
.ark-locale {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}
.ark-locale__select {
  height: 2rem;
  padding: 0 0.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background-color: var(--surface-card);
  color: var(--foreground);
  font-size: var(--text-xs, 0.75rem);
  font-family: var(--ark-font-ui);
}
.ark-locale__submit {
  height: 2rem;
  padding: 0 0.625rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background-color: var(--surface-card);
  color: var(--foreground);
  font-size: var(--text-xs, 0.75rem);
  cursor: pointer;
}
.ark-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.ark-card {
  background-color: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-2xl);
  color: var(--card-foreground);
  box-shadow: var(--shadow-lg);
}
.ark-auth__card { display: grid; gap: 1.5rem; padding: 1.5rem; }
.ark-auth__brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--brand-primary);
}
.ark-mark { display: inline-flex; width: 2rem; height: 2rem; }
.ark-mark svg { display: block; width: 100%; height: 100%; }
.ark-auth__wordmark {
  color: var(--foreground);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: var(--tracking-snug);
}
.ark-auth__heading { display: grid; gap: 0.25rem; text-align: center; }
.ark-auth__heading h1 {
  margin: 0;
  font-size: 1.875rem;
  font-weight: 600;
  letter-spacing: var(--tracking-tight);
}
.ark-auth__heading p { margin: 0; font-size: var(--text-sm); color: var(--text-muted); }
.ark-alert {
  margin: 0;
  padding: 0.75rem;
  border: 1px solid color-mix(in srgb, var(--destructive) 35%, transparent);
  border-radius: var(--radius-lg);
  background-color: var(--destructive-soft);
  color: var(--destructive);
  font-size: var(--text-sm);
}
.ark-form { display: grid; gap: 1rem; }
.ark-field { display: grid; gap: 0.375rem; font-size: var(--text-sm); font-weight: 500; }
.ark-input {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  height: 38px;
  padding: 0 0.75rem;
  background-color: var(--surface-bg);
  border: 1px solid var(--input);
  border-radius: var(--radius-md);
  color: var(--foreground);
  transition: border-color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
}
.ark-input:focus-within { border-color: var(--ring); box-shadow: var(--ring-focus); }
.ark-input__icon { display: inline-flex; flex: none; width: 1rem; height: 1rem; color: var(--text-muted); }
.ark-input__icon svg { width: 100%; height: 100%; }
.ark-input input {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: inherit;
  font: inherit;
}
.ark-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  width: 100%;
  height: 2.75rem;
  padding: 0 1.25rem;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background-color: var(--primary);
  color: var(--primary-foreground);
  font-family: inherit;
  font-size: var(--text-md);
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: filter var(--duration-fast) var(--ease-out);
}
.ark-button:hover { filter: brightness(1.08); }
.ark-button:focus-visible { outline: none; box-shadow: var(--ring-focus); }
.ark-button:disabled { opacity: 0.45; pointer-events: none; }
.ark-button--outline {
  background-color: transparent;
  border-color: var(--border-strong);
  color: var(--foreground);
}
.ark-button--outline:hover { filter: none; background-color: var(--accent); }
.ark-auth__status { margin: 0; text-align: center; font-size: var(--text-sm); color: var(--text-muted); }
.ark-auth__links { margin: 0; text-align: center; font-size: var(--text-sm); }
.ark-auth__links a { color: var(--primary); font-weight: 500; text-decoration: none; }
.ark-auth__links a:hover { text-decoration: underline; }
.ark-auth__admin { padding: 0.75rem; border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); background-color: var(--surface-bg); }
.ark-auth__admin summary { cursor: pointer; font-size: var(--text-sm); font-weight: 500; color: var(--text-muted); }
.ark-auth__admin[open] summary { margin-bottom: 0.75rem; }
.ark-altcha { text-align: center; font-size: var(--text-sm); color: var(--text-muted); }
.ark-altcha--widget {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background-color: var(--surface-bg);
  cursor: pointer;
}
.ark-altcha__checkbox { width: 1.25rem; height: 1.25rem; margin: 0; accent-color: var(--primary); cursor: pointer; }
.ark-altcha__label { font-size: var(--text-sm); color: var(--text-muted); }
.ark-altcha--widget.is-verified .ark-altcha__label { color: var(--primary); font-weight: 500; }
.ark-altcha__brand { margin-left: auto; font-size: var(--text-xs); font-weight: 600; letter-spacing: var(--tracking-snug); color: var(--text-muted); }
.ark-app-link {
  position: fixed;
  top: 1rem;
  right: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.875rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  background-color: var(--surface-card);
  color: var(--foreground);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}
.ark-app-link:hover { background-color: var(--accent); }
.ark-app-link:focus-visible { outline: none; box-shadow: var(--ring-focus); }
.ark-auth__error { display: grid; gap: 1rem; padding: 1.5rem; }
.ark-auth__error-icon { display: inline-flex; width: 2.5rem; height: 2.5rem; color: var(--destructive); }
.ark-auth__error-icon svg { width: 100%; height: 100%; }
.ark-auth__error h1 { margin: 0; font-size: var(--text-xl); font-weight: 600; }
.ark-auth__error p { margin: 0; font-size: var(--text-base); line-height: var(--leading-normal); color: var(--text-muted); }
