/* Shared by every page, linked from partials/head.html. Styles only one page needs stay inline
   in that page. */

:root {
  color-scheme: light dark;
  --bg: #fbfbfa; --surface: #f2f2f0; --line: #dcdcd8;
  --text: #151619; --muted: #56575c; --faint: #a3a4a8;
  --accent: #1a66dd;   /* mission control only; everything else is monochrome */
  --accent-tint: rgba(26, 102, 221, 0.07);
  --gap: 3rem;   /* between sections, the same above and below each divider line */
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a0b; --surface: #131315; --line: #26272b;
    --text: #e3e3e0; --muted: #9c9da2; --faint: #45464b;
    --accent: #2f80ff;
    --accent-tint: rgba(47, 128, 255, 0.10);
  }
}
body {
  max-width: 47rem;
  margin: 0 auto;
  padding: 4rem 1.25rem;
  background: var(--bg);
  color: var(--text);
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
}
h1, h2, h3 { font-size: 1.0625rem; font-weight: 700; line-height: 1.4; }
h3 { font-weight: 500; }
h1 { margin: 0 0 1.25rem; }
h2 { margin: 0; font-size: 1.375rem; letter-spacing: -0.01em; line-height: 1.3; }   /* section headings stand out from the text */
pre, code, .mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }

/* one column, straight down: each heading above its content. A section's bottom margin and the
   next one's top padding match, so its divider line sits in the middle of the gap. */
section { margin-bottom: var(--gap); }
section:has(h2) { padding-top: var(--gap); border-top: 1px solid var(--line); }
section > * { margin-top: 0; }
section > h2 { margin-bottom: 1.25rem; }
section > article h3 { margin-top: 0; }

a { color: inherit; text-decoration-color: var(--faint); text-underline-offset: 0.15em; }
a:hover { text-decoration-color: currentColor; }

/* Buttons are monochrome: filled with the text color, labelled in the page color. */
button, .button {
  display: inline-flex; align-items: center; box-sizing: border-box;
  height: 2.75rem; padding: 0 1.25rem; vertical-align: top;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  color: var(--bg); background: var(--text); border: 1px solid var(--text); border-radius: 4px;
}
button:hover, .button:hover { background: var(--muted); border-color: var(--muted); }
button:focus-visible, .button:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
button:disabled { cursor: progress; opacity: 0.6; }

form { margin-top: 1.5rem; }
form label { display: block; margin-bottom: 0.375rem; font-weight: 600; }
form label small { font-size: inherit; font-weight: 400; color: var(--muted); }
.field { margin: 0 0 1.25rem; }
input[type=email], textarea {
  box-sizing: border-box; max-width: 100%;
  font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: 4px;
}
input[type=email] { width: 18rem; height: 2.75rem; padding: 0 0.875rem; }
textarea { display: block; width: 100%; min-height: 8rem; padding: 0.625rem 0.875rem; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, textarea:focus { outline: 2px solid var(--text); outline-offset: -1px; border-color: var(--text); }
.hint { margin: 0.5rem 0 0; font-size: 0.875rem; color: var(--muted); }
.status { margin: 0.75rem 0 0; font-weight: 600; }
.status:empty { display: none; }
.trap { position: absolute; left: -100vw; }   /* the honeypot: off screen, so only bots fill it in */

/* Header: the mark and name on the left, the top nav on the right. When both don't fit on one
   line, the nav wraps below the mark. */
.site-header {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.75rem 1.5rem; margin-bottom: 4rem;
}
.site { display: inline-flex; align-items: center; gap: 0.875rem; color: inherit; text-decoration: none; }
.logo { display: block; flex: none; width: 4rem; height: 4rem; }   /* the mark, drawn by /logo.js in the text color */
.logo[hidden] { display: none; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; margin: 0; padding: 0; list-style: none; }
.site-nav a { text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current=page] { text-decoration: underline; text-decoration-color: currentColor; }
.site-nav a[aria-current=page] { text-decoration-thickness: 2px; }
@media (max-width: 30rem) {   /* phones: a smaller mark and type keep the name and nav on one line down to ~370px */
  .site-header { column-gap: 1rem; font-size: 0.9375rem; }
  .site { gap: 0.5rem; }
  .logo { width: 2.5rem; height: 2.5rem; }
  .site-nav ul { column-gap: 0.875rem; }
}

.site-footer { margin-top: 6rem; color: var(--muted); }
.elsewhere ul { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1rem -0.5rem; padding: 0; list-style: none; }
.elsewhere a { display: block; padding: 0.5rem; color: inherit; }   /* padding makes each icon an easier target */
.elsewhere a:hover { color: var(--text); }
.elsewhere svg { display: block; width: 1.25rem; height: 1.25rem; }
