:root {
  color-scheme: light dark;
  --bg: #fbfaf8;
  --text: #1c1b1a;
  --muted: #55524e;
  --line: #d9d5cf;
  --field-bg: #ffffff;
  --field-border: #75716b;
  --accent: #8b2635;
  --accent-text: #ffffff;
  --accent-hover: #6e1d29;
  --focus: #8b2635;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161514;
    --text: #edeae6;
    --muted: #b5b0a9;
    --line: #3a3734;
    --field-bg: #1f1e1c;
    --field-border: #8d8881;
    --accent: #f0a8b0;
    --accent-text: #161514;
    --accent-hover: #f7c9ce;
    --focus: #f0a8b0;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

.wrap {
  width: 100%;
  max-width: 40rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -10rem;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
  text-decoration: none;
  border-radius: 0.375rem;
  z-index: 10;
}

.skip-link:focus {
  top: 1rem;
}

.skip-link:hover {
  color: var(--accent-text);
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  min-height: 4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text);
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.brand:hover {
  color: var(--accent);
}

/* Main */
main {
  flex: 1 0 auto;
  padding: 3.5rem 0 4rem;
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0;
  font-weight: 650;
}

h1 {
  font-size: clamp(2rem, 7vw, 2.75rem);
  letter-spacing: -0.015em;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--accent-hover);
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.inline-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.lead {
  font-size: 1.1875rem;
  color: var(--text);
}

/* The home page's introduction, under the main heading */
.intro {
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--muted);
}

/* Button */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  min-width: 44px;
  padding: 0.75rem 1.5rem;
  border: 2px solid var(--accent);
  border-radius: 0.375rem;
  background: var(--accent);
  color: var(--accent-text);
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--accent-text);
}

.actions {
  margin-top: 3rem;
}

/* Form */
.form {
  margin-top: 0.5rem;
}

.field {
  margin-bottom: 1.5rem;
}

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

.field input,
.field textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--field-border);
  border-radius: 0.375rem;
  background: var(--field-bg);
  color: var(--text);
  font: inherit;
  line-height: 1.5;
}

.field textarea {
  min-height: 10rem;
  resize: vertical;
}

.field input:focus-visible,
.field textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 1px;
  border-color: var(--focus);
}

/* Turnstile's compact widget is 150 x 140 pixels; its space is kept so the page does not jump.
   Without scripting it never appears, so no space is kept. */
.turnstile {
  min-height: 140px;
}

@media (scripting: none) {
  .turnstile {
    display: none;
  }
}

.form-note {
  margin-top: 2rem;
  color: var(--muted);
}

/* Hidden from everyone: spam trap */
.trap {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 2rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.site-footer p {
  margin: 0 0 0.5rem;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  column-gap: 1.5rem;
}

.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
}

.site-footer a:hover {
  color: var(--accent);
}

.site-footer a[aria-current="page"] {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}

@media (prefers-reduced-motion: no-preference) {
  a,
  .button {
    transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
  }
}

main:focus {
  outline: none;
}
