:root {
  color-scheme: light;
  --bg: #fafaf8;
  --fg: #1a1a1a;
  --muted: #6b6b6b;
  --accent: #1f4d8b;
  --border: #e5e3dc;
  --code-bg: #f1efe9;
  --max-width: 920px;
  --max-width-wide: 1100px;
  --font-stack: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  --mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, monospace;
  --text-display: clamp(2.1rem, 4.5vw, 3.2rem);
  --text-h1: 2rem;
  --text-h2: 1.4rem;
  --text-lede: 1.1rem;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 10px;
  --radius-pill: 999px;
}

* {
  box-sizing: border-box;
}

/* Reset native form-control styling so Safari / iOS don't apply the
   system accent colour to button text (renders as "blue on blue"
   when the button bg is also our --accent navy). Per-button styles
   below still set bg + color explicitly. */
button,
input[type="submit"],
input[type="button"] {
  -webkit-appearance: none;
  appearance: none;
  font-family: inherit;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: var(--font-stack);
  color: var(--fg);
  background: var(--bg);
  line-height: 1.55;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.brand {
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.01em;
  color: var(--fg);
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.9rem;
}

.topbar-nav .btn-trial {
  background: var(--accent);
  color: #fff;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-md);
  font-weight: 600;
}

.topbar-nav .btn-trial:hover {
  text-decoration: none;
  filter: brightness(0.94);
}

.muted {
  color: var(--muted);
}

.content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

.hero h1 {
  font-size: 2.25rem;
  margin: 0 0 0.5rem;
}

.lede {
  font-size: 1.1rem;
  margin: 0 0 1rem;
}

.error pre.detail {
  background: var(--code-bg);
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.85rem;
}

.footer {
  max-width: var(--max-width);
  margin: 3rem auto 2rem;
  padding: 0 1.5rem;
  font-size: 0.85rem;
}

.auth {
  max-width: 420px;
  margin: 2rem auto;
}

.auth h1 {
  font-size: 1.6rem;
  margin: 0 0 0.75rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.auth-form label {
  font-size: 0.85rem;
  color: var(--muted);
}

.auth-form input {
  padding: 0.65rem 0.75rem;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  font-family: inherit;
}

.auth-form input:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
}

.auth-form button {
  /* appearance:none stops Safari / iOS from overriding the text colour
     with the system accent (which is blue, matching the button bg —
     visible as "blue on blue" on macOS Safari before this rule). */
  -webkit-appearance: none;
  appearance: none;
  margin-top: 0.5rem;
  padding: 0.7rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

.auth-form button:hover {
  filter: brightness(0.95);
}

.form-error {
  color: #b03a2e;
  background: #fdecea;
  border: 1px solid #f5c6c6;
  padding: 0.6rem 0.75rem;
  border-radius: 6px;
  font-size: 0.9rem;
}
