:root {
  color-scheme: dark light;
  --paper: #0b0b16;
  --ink: #ecebf5;
  --accent: #a391ff;
  --muted: #a7a5b8;
  --rule: #2c2a42;
  --field: #15142a;
  --field-border: #5d588a;
  font-family: system-ui, sans-serif;
  line-height: 1.65;
}

/* The app is dark-only; the site follows the visitor's preference. */
@media (prefers-color-scheme: light) {
  :root {
    --paper: #f6f5fb;
    --ink: #1d1b2e;
    --accent: #5141b8;
    --muted: #5c5a70;
    --rule: #d9d6ea;
    --field: #ffffff;
    --field-border: #8a85ad;
  }
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  overflow-wrap: break-word;
}

header, main {
  box-sizing: border-box;
  width: min(100%, 50rem);
  margin-inline: auto;
  padding-inline: clamp(1rem, 5vw, 3rem);
}

header {
  padding-block: 1.25rem;
  border-bottom: 1px solid var(--rule);
  font-weight: 700;
}

main {
  padding-block: clamp(2rem, 7vw, 4rem);
}

.home {
  padding-block-start: clamp(4rem, 14vw, 8rem);
}

h1, h2 {
  color: var(--accent);
  line-height: 1.18;
}

h1 {
  margin: 0 0 1rem;
  font-family: ui-rounded, system-ui, sans-serif;
  font-size: clamp(2.2rem, 7vw, 3.55rem);
}

h2 {
  margin: 0;
  font-size: 1.3rem;
}

p {
  margin: 0.7rem 0 0;
}

section {
  margin-top: 1.65rem;
  padding-top: 1.3rem;
  border-top: 1px solid var(--rule);
}

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

:is(a, button, input, textarea):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.action {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  margin-top: 1.5rem;
  font-weight: 650;
}

.home-links {
  display: flex;
  flex-wrap: wrap;
  column-gap: 1.5rem;
}

.support-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
  max-width: 36rem;
  margin-top: 1.75rem;
}

.form-field {
  display: grid;
  gap: 0.35rem;
}

.form-field label {
  font-weight: 650;
}

.optional {
  font-weight: 400;
}

.support-form :is(textarea, input) {
  box-sizing: border-box;
  width: 100%;
  min-height: 2.75rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--field-border);
  border-radius: 0.65rem;
  background: var(--field);
  color: var(--ink);
  font: inherit;
}

.support-form textarea {
  resize: vertical;
}

.form-policy, #form-status {
  margin: 0;
}

.form-policy {
  font-size: 0.9rem;
}

.support-form button {
  justify-self: start;
  min-height: 2.75rem;
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--accent);
  border-radius: 0.65rem;
  background: var(--accent);
  color: var(--paper);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

.support-form button:disabled {
  background: transparent;
  color: var(--accent);
  cursor: default;
}

#form-status {
  font-weight: 600;
}

#turnstile:empty {
  display: none;
}

.skip {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  transform: translateY(-150%);
  padding: 0.5rem;
  background: var(--paper);
}

.skip:focus {
  transform: none;
}

.updated, small {
  color: var(--muted);
}
