/* Shared styling for the standalone, mostly-unauthenticated pages:
   verify-email, reset-password, data-export, privacy, terms.

   Deliberately the same vocabulary as login.html (.login-card, .login-btn,
   .login-error, .login-note) so a user moving from an emailed link to the sign-in
   form doesn't cross a visual seam. Extracted rather than inlined five times. */

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

/* The `hidden` attribute is only `display: none` from the browser's own stylesheet,
   so any author rule setting `display` beats it -- .login-btn sets `display: flex`.
   These pages toggle state with `hidden`, so this rule is load-bearing. */
[hidden] { display: none !important; }

html, body {
  height: 100%;
  font-family: 'Outfit', system-ui, sans-serif;
  background: #fff;
  color: #111;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  padding: 1.5rem;
}

.page-shell {
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Prose pages (privacy, terms) need room to read. */
.page-shell.wide { max-width: 680px; }

.login-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.login-logo-wordmark {
  font-weight: 400;
  font-size: 0.95rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(14,31,61,0.65);
}

.login-card {
  width: 100%;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 2rem;
}

.login-heading {
  font-size: 1.15rem;
  font-weight: 600;
  color: #111;
  text-align: center;
  margin-bottom: 0.4rem;
}

.login-sub {
  font-size: 0.78rem;
  color: #888;
  text-align: center;
  margin-bottom: 1.5rem;
}

.login-body {
  font-size: 0.82rem;
  line-height: 1.6;
  color: #444;
  text-align: center;
}
.login-body strong { color: #111; }

.login-field { margin-bottom: 0.75rem; }

.login-input {
  width: 100%;
  padding: 0.6rem 0.85rem;
  font-size: 0.875rem;
  font-family: inherit;
  border: 1px solid #d1d1d1;
  border-radius: 6px;
  background: #fff;
  color: #111;
  outline: none;
  transition: border-color 0.15s;
}
.login-input:focus { border-color: #0e1f3d; }
.login-input::placeholder { color: #aaa; }
.login-input.field-error { border-color: #c8102e; }

.login-btn {
  width: 100%;
  padding: 0.65rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  background: #0e1f3d;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.25rem;
  transition: background 0.15s;
}
.login-btn:hover    { background: #1a3460; }
.login-btn:disabled { background: #aaa; cursor: not-allowed; }

.login-btn-ghost {
  background: #fff;
  color: #0e1f3d;
  border: 1px solid #d1d1d1;
}
.login-btn-ghost:hover { background: #f5f6f8; }

.login-error {
  margin-top: 0.75rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.78rem;
  color: #c8102e;
  background: rgba(200,16,46,0.05);
  border: 1px solid rgba(200,16,46,0.2);
  border-radius: 6px;
  display: none;
}
.login-error.visible { display: block; }

.login-note {
  margin-top: 0.75rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.78rem;
  color: #0e1f3d;
  background: rgba(14,31,61,0.04);
  border: 1px solid rgba(14,31,61,0.15);
  border-radius: 6px;
  display: none;
}
.login-note.visible { display: block; }

.login-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
  font-size: 0.75rem;
  color: #bbb;
}
.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e5e5e5;
}

.login-alt {
  font-size: 0.78rem;
  text-align: center;
  color: #888;
}
.login-alt a {
  color: #0e1f3d;
  text-decoration: underline;
  cursor: pointer;
}

.status-icon {
  display: block;
  margin: 0 auto 0.9rem;
  color: #0e1f3d;
}
.status-icon.bad { color: #c8102e; }

/* A spinner for the export page, which does real work on load. */
.spinner {
  width: 28px;
  height: 28px;
  margin: 0 auto 1rem;
  border: 3px solid rgba(14,31,61,0.15);
  border-top-color: #0e1f3d;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 3s; }
}

/* ── Prose, for the policy pages ─────────────────────────────────────────── */

.prose {
  font-size: 0.88rem;
  line-height: 1.65;
  color: #333;
}
.prose h1 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #111;
  margin-bottom: 0.5rem;
}
.prose h2 {
  font-size: 1rem;
  font-weight: 600;
  color: #111;
  margin: 1.75rem 0 0.5rem;
}
.prose h3 {
  font-size: 0.88rem;
  font-weight: 600;
  color: #0e1f3d;
  margin: 1.25rem 0 0.4rem;
}
.prose p  { margin-bottom: 0.85rem; }
.prose ul,
.prose ol { margin: 0 0 0.85rem 1.2rem; }
.prose li { margin-bottom: 0.35rem; }
.prose a  { color: #0e1f3d; }
.prose strong { color: #111; }

.prose hr {
  border: none;
  border-top: 1px solid #eee;
  margin: 1.75rem 0;
}

.prose blockquote {
  margin: 0 0 0.85rem;
  padding: 0.6rem 0.9rem;
  border-left: 3px solid #e5e5e5;
  background: #faf9f7;
  color: #555;
}
.prose blockquote p:last-child { margin-bottom: 0; }

.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85em;
  padding: 0.05rem 0.3rem;
  background: #f2f1ee;
  border-radius: 3px;
}

/* Tables carry a lot of the privacy notice. They must not force the page to
   scroll sideways on a phone, so each one scrolls inside its own box. */
.prose table {
  width: 100%;
  margin-bottom: 1rem;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.prose th,
.prose td {
  padding: 0.45rem 0.6rem;
  border: 1px solid #e5e5e5;
  text-align: left;
  vertical-align: top;
}
.prose th {
  background: #faf9f7;
  font-weight: 600;
  color: #0e1f3d;
}

@media (max-width: 560px) {
  .prose table { display: block; overflow-x: auto; white-space: nowrap; }
}

/* Unresolved [[...]] fields in the legal drafts. Highlighted so nobody mistakes a
   blank for finished copy, and counted into the banner at the top. */
mark.todo {
  background: #fff3cd;
  color: #7a4f00;
  padding: 0 0.2rem;
  border-radius: 3px;
  font-style: italic;
}
mark.todo a { color: inherit; }

/* Unmistakable while these pages are stubs, so a placeholder cannot quietly ride
   along to production. */
.placeholder-banner {
  margin-bottom: 1.5rem;
  padding: 0.7rem 0.9rem;
  font-size: 0.78rem;
  line-height: 1.5;
  color: #8a5a00;
  background: #fff8e6;
  border: 1px solid #f0d48a;
  border-radius: 6px;
  text-align: center;
}

.page-meta {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #eee;
  font-size: 0.72rem;
  color: #999;
  text-align: center;
}
