:root {
  --paper: #fffcf0;
  --paper-raised: #ffffff;
  --paper-deep: #f6f4ea;
  --ink: #292621;
  --rim: rgba(255, 255, 255, 0.45);
  --ground: rgba(0, 0, 0, 0.08);
  --error: #a4402c;

  --column: 640px;
  --gutter: max(30px, env(safe-area-inset-left), env(safe-area-inset-right));
  --tap-size: 44px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1c1c1b;
    --paper-raised: #292928;
    --paper-deep: #131312;
    --ink: #e6e1d1;
    --rim: rgba(255, 255, 255, 0.10);
    --ground: rgba(0, 0, 0, 0.55);
    --error: #e5a08f;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;
  font-size: 15px;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overflow-wrap: break-word;
}

a,
button,
input,
select,
textarea,
label,
summary {
  -webkit-tap-highlight-color: transparent;
}

.page {
  max-width: var(--column);
  margin: 0 auto;
  padding: 48px var(--gutter) 72px;
  padding-top: max(48px, env(safe-area-inset-top));
  padding-bottom: max(72px, env(safe-area-inset-bottom));
}

h1 {
  margin: 0 0 16px;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 0.06em;
}

h2 {
  margin: 56px 0 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--ink) 55%, transparent);
}

h3 {
  margin: 32px 0 8px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.05em;
}

p,
li,
dd,
dt,
label,
input,
select,
textarea,
button {
  font-size: 14px;
}

.dim {
  color: color-mix(in srgb, var(--ink) 55%, transparent);
}

.faint {
  color: color-mix(in srgb, var(--ink) 30%, transparent);
}

.meta {
  font-size: 12px;
}

ul,
ol {
  margin: 8px 0;
  padding-left: 1.2em;
}

li {
  margin: 4px 0;
}

li::marker {
  color: color-mix(in srgb, var(--ink) 30%, transparent);
}

a {
  color: var(--ink);
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

a:active {
  opacity: 0.6;
}

hr {
  height: 2px;
  margin: 56px 0;
  border: 0;
  background: linear-gradient(var(--ground) 0 50%, var(--rim) 50% 100%);
}

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
  padding: 8px 16px;
  background: var(--ink);
  color: var(--paper);
}

header.site {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 56px;
}

.wordmark {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.wordmark a {
  color: inherit;
  text-decoration: none;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-size);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-decoration: none;
  color: color-mix(in srgb, var(--ink) 55%, transparent);
}

.site-nav a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
}

.plate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 24px;
  border: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  box-shadow:
    inset 0 0 0 1px var(--ground),
    inset 0 0 0 2px var(--rim);
}

.plate:hover {
  background: var(--paper-deep);
}

.plate:active {
  opacity: 0.75;
}

.faq-list {
  position: relative;
  margin-top: 12px;
}

.faq-list::before,
.faq-item::after {
  content: "";
  position: absolute;
  right: 0;
  left: 0;
  height: 2px;
  pointer-events: none;
  background: linear-gradient(var(--ground) 0 50%, var(--rim) 50% 100%);
}

.faq-list::before {
  top: 0;
}

.faq-item {
  position: relative;
}

.faq-item::after {
  bottom: 0;
}

.faq-item summary {
  position: relative;
  padding: 18px 36px 18px 0;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  position: absolute;
  top: 18px;
  right: 4px;
  color: color-mix(in srgb, var(--ink) 45%, transparent);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.5;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item summary:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

.faq-answer {
  padding: 0 36px 18px 0;
  color: color-mix(in srgb, var(--ink) 55%, transparent);
}

.faq-answer p {
  margin: 0;
}

.legal ol ol {
  margin-top: 4px;
  padding-left: 1.1em;
}

.lang-switch {
  margin-top: 4px;
  text-align: right;
  font-size: 12px;
  letter-spacing: 0.1em;
}

.field {
  margin-top: 24px;
}

.field > label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.field input[type="text"],
.field input[type="email"],
.field select,
.field textarea {
  width: 100%;
  min-height: var(--tap-size);
  padding: 10px 12px;
  border: 0;
  background: var(--paper-raised);
  color: var(--ink);
  font-family: inherit;
  font-size: 16px;
  line-height: 1.6;
  box-shadow: inset 0 0 0 1px var(--ground);
}

.field textarea {
  resize: vertical;
}

.field :is(input, select, textarea):focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.field [aria-invalid="true"] {
  box-shadow: inset 0 0 0 1px var(--error);
}

.field-check > label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--tap-size);
  margin-bottom: 0;
  font-weight: 400;
}

.field-check input[type="checkbox"] {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--ink);
}

.field-submit {
  margin-top: 32px;
}

.field-submit .plate {
  width: 100%;
}

.required-mark {
  color: var(--error);
}

.error {
  margin: 6px 0 0;
  color: var(--error);
  font-size: 12px;
}

.alert {
  margin-top: 24px;
  padding: 16px 20px;
  box-shadow: inset 0 0 0 1px var(--error);
}

.alert p {
  margin: 0 0 8px;
  font-weight: 600;
  color: var(--error);
}

.alert ul {
  margin: 0;
  color: var(--error);
}

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

footer.site {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 20px;
  margin-top: 72px;
  font-size: 12px;
}

footer.site a {
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: color-mix(in srgb, var(--ink) 55%, transparent);
}

footer.site .copyright {
  margin-left: auto;
}

@media (min-width: 640px) {
  header.site {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 64px;
  }

  .site-nav ul {
    gap: 0 20px;
  }

  .site-nav a {
    min-height: 0;
  }

  .field-submit .plate {
    width: auto;
  }
}
