:root {
  --fg: #1a1a1a;
  --fg-muted: #555;
  --bg: #fafaf7;
  --accent: #1f6feb;
  --rule: #e3e3df;
  --max-width: 36rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fg: #ececec;
    --fg-muted: #a0a0a0;
    --bg: #14161a;
    --accent: #79b8ff;
    --rule: #2a2d33;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem 1.5rem 6rem;
}

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

a:hover {
  text-decoration: underline;
}

h1 {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.25rem;
}

h2 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 2.5rem 0 0.75rem;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 2rem 0 0.5rem;
}

p,
ul,
ol {
  margin: 0 0 1rem;
}

ul,
ol {
  padding-left: 1.25rem;
}

li {
  margin-bottom: 0.25rem;
}

hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 2.5rem 0;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
}

/* Landing page */
.landing header {
  margin-bottom: 2rem;
}

.landing .tagline {
  color: var(--fg-muted);
  font-size: 1.1rem;
  margin: 0;
}

.landing .links ul {
  list-style: none;
  padding: 0;
}

.landing .links li {
  margin-bottom: 0.5rem;
}

.landing footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  color: var(--fg-muted);
  font-size: 0.9rem;
}

.landing footer p {
  margin: 0;
}

/* Support page */
.support .back {
  display: inline-block;
  margin-bottom: 2rem;
  font-size: 0.9rem;
  color: var(--fg-muted);
}

.support h1 {
  margin-bottom: 0.5rem;
}

.support-intro {
  color: var(--fg-muted);
  margin-bottom: 2rem;
}

.field {
  margin-bottom: 1.25rem;
}

.field label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.field .optional {
  font-weight: 400;
  color: var(--fg-muted);
}

.field .required {
  color: var(--accent);
}

.field input[type="text"],
.field input[type="email"],
.field textarea {
  display: block;
  width: 100%;
  padding: 0.6rem 0.75rem;
  font-size: 1rem;
  font-family: inherit;
  line-height: 1.5;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--rule);
  border-radius: 6px;
  outline: none;
  transition: border-color 0.15s;
  -webkit-appearance: none;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--accent);
}

.field textarea {
  resize: vertical;
}

button[type="submit"] {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.65rem 1.5rem;
  font-size: 1rem;
  font-family: inherit;
  font-weight: 600;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: opacity 0.15s;
}

button[type="submit"]:hover {
  opacity: 0.85;
}

button[type="submit"]:disabled {
  opacity: 0.5;
  cursor: default;
}

.form-msg {
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.form-msg--error {
  background: color-mix(in srgb, red 10%, transparent);
  color: #c0392b;
  border: 1px solid color-mix(in srgb, red 25%, transparent);
}

@media (prefers-color-scheme: dark) {
  .form-msg--error {
    color: #ff7b72;
  }
}

.form-success {
  padding: 1.25rem;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  border-radius: 6px;
  color: var(--fg);
}

.form-success p {
  margin: 0;
}

/* Legal pages */
.legal .meta {
  color: var(--fg-muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.legal .back {
  display: inline-block;
  margin-bottom: 2rem;
  font-size: 0.9rem;
  color: var(--fg-muted);
}

.legal h1 {
  margin-bottom: 0.5rem;
}
