:root {
  --ink: #16161b;
  --ink-soft: #4a5262;
  --paper: #ffffff;
  --sunken: #f4f5f8;
  --hairline: #e4e7ec;
  --accent: #2356f5;
  /* The wordmark's own colours (docs/brand). */
  --mark-ink: #15161b;
  --mark-node: #ffc21a;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f2f4f7;
    --ink-soft: #a8afbb;
    --paper: #0d0e11;
    --sunken: #17181c;
    --hairline: #26282e;
    --accent: #7c9bff;
    --mark-ink: #f2f4f8;
    --mark-node: #ffd23f;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-underline-offset: 3px; }

.wrap { max-width: 720px; margin: 0 auto; padding-left: 20px; padding-right: 20px; }

header.bar { border-bottom: 1px solid var(--hairline); }
/* The wordmark is lowercase: most of its weight is in the x-height band, so centring its box
   makes it look low. It sits on the links' baseline instead, a little higher than centred (the
   bar's middle falls between the box's middle and the x-height's). The SVG is inlined from
   `swift scripts/make_wordmark.swift --inline`: cropped to the ink, so its bottom edge is the
   baseline, and coloured here, so it follows light and dark mode. */
header.bar .wrap { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-top: 16px; padding-bottom: 14px; }
.brand { display: flex; }
.wordmark { display: block; }
.wordmark-ink { fill: none; stroke: var(--mark-ink); stroke-width: 84; stroke-linecap: round; stroke-linejoin: round; }
.wordmark-node { fill: var(--mark-node); }

nav a { color: var(--ink-soft); text-decoration: none; font-weight: 600; margin-left: 20px; }
nav a:hover, nav a[aria-current="page"] { color: var(--ink); }

main { padding-top: 64px; padding-bottom: 80px; }

h1 { font-size: 40px; line-height: 1.1; letter-spacing: -1px; margin: 0 0 8px; font-weight: 800; }
h2 { font-size: 22px; letter-spacing: -0.3px; margin: 40px 0 8px; }
p, li { color: var(--ink); }
.meta { color: var(--ink-soft); margin: 0 0 32px; }
.lead { font-size: 20px; color: var(--ink-soft); }

.card { background: var(--sunken); border: 1px solid var(--hairline); border-radius: 22px; padding: 20px 24px; margin: 24px 0; }

dl.faq dt { font-weight: 700; margin-top: 24px; }
dl.faq dd { margin: 4px 0 0; color: var(--ink-soft); }

footer { border-top: 1px solid var(--hairline); color: var(--ink-soft); font-size: 15px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; padding-top: 24px; padding-bottom: 40px; }
footer a { color: var(--ink-soft); }

@media (max-width: 520px) {
  main { padding-top: 44px; padding-bottom: 64px; }
  h1 { font-size: 32px; }
  nav a { margin-left: 14px; }
}

/* The narrowest phones (320 pt): a smaller wordmark keeps it clear of the links. */
@media (max-width: 360px) {
  .wordmark { width: 114px; height: 24px; }
  nav a { margin-left: 12px; }
}
