:root {
  --bg: #ffffff;
  --surface: #f5f5f7;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --accent: #4f63f6;
  --accent-text: #ffffff;
  --link: #4f5ef6;
  --rule: #e5e5ea;
  --field: #ffffff;
  --field-border: #86868b;
  --good: #1f7a3a;
  --good-bg: #e8f5ec;
  --bad: #b3261e;
  --bad-bg: #fdecea;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000;
    --surface: #1c1c1e;
    --text: #f5f5f7;
    --muted: #a1a1a6;
    --accent: #7c8cff;
    --accent-text: #0b0b0f;
    --link: #6f80f8;
    --rule: #2c2c2e;
    --field: #1c1c1e;
    --field-border: #7c7c80;
    --good: #6fdc8c;
    --good-bg: #10261a;
    --bad: #ff8a80;
    --bad-bg: #2d1311;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
}
/* Links: brand blue, no underline. The blue has at least 4.5:1 contrast with every background
   and 3:1 with body text (WCAG 1.4.1, 1.4.3); hover darkens it and keyboard focus adds an outline. */
a { color: var(--link); text-decoration: none; }
a:hover, a:focus-visible { filter: brightness(.85); }

/* Skip link: hidden until a keyboard user tabs to it (WCAG 2.4.1). */
.skip-link {
  position: absolute;
  left: 8px;
  top: -100px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
}
.skip-link:focus { top: 8px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* Header and footer */
.site-header { border-bottom: 1px solid var(--rule); }
.site-header .inner, .site-footer .inner, main { max-width: 760px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
.site-header .inner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding-top: 14px; padding-bottom: 14px; }
.brand { font-weight: 700; font-size: 1.15rem; color: var(--text); text-decoration: none; margin-right: auto; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 0.95rem; }
.site-header nav a { color: var(--muted); text-decoration: none; display: inline-block; padding: 10px 0; }
.site-header nav a[aria-current="page"] { color: var(--text); font-weight: 600; }
.site-footer { border-top: 1px solid var(--rule); color: var(--muted); font-size: 0.9rem; }
.site-footer .inner { padding-top: 24px; padding-bottom: 40px; display: flex; flex-wrap: wrap; gap: 8px 16px; }
.site-footer a { color: var(--muted); display: inline-block; padding: 6px 0; }

/* Content */
main { padding-top: 40px; padding-bottom: 64px; }
h1 { font-size: 2.1rem; line-height: 1.2; margin: 0 0 6px; }
h2 { font-size: 1.3rem; margin: 40px 0 8px; padding-top: 16px; border-top: 1px solid var(--rule); }
h3 { font-size: 1.05rem; margin: 24px 0 4px; }
.meta { color: var(--muted); margin: 0 0 24px; }
.lead { font-size: 1.1rem; }
.toc { background: var(--surface); border-radius: 12px; padding: 12px 20px; font-size: 0.95rem; }
.toc ol { margin: 8px 0; padding-left: 20px; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { text-align: left; vertical-align: top; padding: 8px; border-bottom: 1px solid var(--rule); }
th { font-weight: 600; }
address { font-style: normal; }

/* FAQ: each topic's questions sit in a box like the Topics box, with small square markers. */
.faq-group { background: var(--surface); border-radius: 12px; padding: 4px 20px; }
details { border-bottom: 1px solid var(--rule); padding: 4px 0; }
.faq-group details:last-child { border-bottom: 0; }
summary {
  display: block; /* no built-in disclosure triangle */
  cursor: pointer; font-weight: 600; padding: 10px 0 10px 20px; min-height: 44px; position: relative;
}
summary::-webkit-details-marker { display: none; }
summary::marker { content: ""; }
summary::before {
  content: "";
  position: absolute;
  left: 2px;
  top: calc(10px + 0.8em - 3px);
  width: 6px;
  height: 6px;
  background: currentColor;
}
details[open] summary::before { background: var(--accent); }
details p { margin: 0 0 12px 20px; }

/* Form */
form { display: grid; gap: 18px; margin-top: 24px; }
label { display: block; font-weight: 600; margin-bottom: 6px; }
.hint { display: block; font-weight: 400; color: var(--muted); font-size: 0.9rem; }
input[type="text"], input[type="email"], select, textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--field);
  border: 1px solid var(--field-border);
  border-radius: 10px;
  padding: 10px 12px;
}
textarea { min-height: 160px; resize: vertical; }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border: 2px solid var(--bad); }
.field-error { display: block; color: var(--bad); font-weight: 600; font-size: 0.95rem; margin-top: 6px; }
.field-error[hidden] { display: none; }
.required-note { color: var(--muted); margin: 0; }
.check input { width: 22px; height: 22px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 5px; }
.honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
button {
  justify-self: start;
  min-height: 44px;
  font: inherit;
  font-weight: 600;
  color: var(--accent-text);
  background: var(--accent);
  border: 0;
  border-radius: 12px;
  padding: 12px 22px;
  cursor: pointer;
}
button[disabled] { opacity: 0.6; cursor: progress; }
.status { border-radius: 10px; padding: 12px 16px; margin: 0; }
.status.good { color: var(--good); background: var(--good-bg); }
.status.bad { color: var(--bad); background: var(--bad-bg); }
.status[hidden] { display: none; }

/* Legally conspicuous text (assumption of risk, releases). */
.conspicuous {
  border-left: 4px solid currentColor;
  padding: 0.75rem 1rem;
  font-size: 0.95em;
  line-height: 1.55;
  background: var(--surface);
  border-radius: 0 8px 8px 0;
}
main:focus { outline: none; }
