/*
 * One stylesheet for every page on the site.
 *
 * **No external requests of any kind, deliberately.** The app's own typeface is Barlow Condensed,
 * and loading it from Google Fonts here would send every visitor's IP address to Google -- on the
 * page whose job is to say what we do and do not send to third parties. A system font stack costs
 * the brand a little and buys the privacy policy the right to be believed.
 *
 * Palette from apps/mobile/assets/brand/README.md, so the site and the app agree: body #1d1f20,
 * page #f2f2f3, fold #9a9ea3.
 */

:root {
  --page: #f2f2f3;
  --ink: #1d1f20;
  --muted: #5e6166;
  --fold: #9a9ea3;
  --rule: #d9dadc;
  --link: #1d1f20;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #16181a;
    --ink: #e8e9ea;
    --muted: #9a9ea3;
    --fold: #6b6f74;
    --rule: #2c2f33;
    --link: #e8e9ea;
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family:
    system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    Helvetica,
    Arial,
    sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

/* A 16px side gutter, so nothing touches the edge on a phone. */
.wrap {
  max-width: 44rem;
  margin: 0 auto;
  padding: 3rem 1rem 4rem;
}

header.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

header.brand img {
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
}

/* The wordmark needs positive tracking: OCTA and SHELF run together with no space between them,
 * so the default spacing reads as one word. apps/mobile's BrandMark uses +0.06em for the same
 * reason. */
header.brand .name {
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

h1 {
  font-size: 1.875rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 0.5rem;
}

h2 {
  font-size: 1.25rem;
  line-height: 1.3;
  margin: 2.5rem 0 0.75rem;
}

h3 {
  font-size: 1.0625rem;
  margin: 1.75rem 0 0.5rem;
}

p,
ul,
ol {
  margin: 0 0 1rem;
}

ul,
ol {
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.4rem;
}

a {
  color: var(--link);
  text-decoration-color: var(--fold);
  text-underline-offset: 2px;
}

a:hover {
  text-decoration-color: var(--link);
}

.lede {
  font-size: 1.125rem;
  color: var(--muted);
}

.muted {
  color: var(--muted);
}

.updated {
  color: var(--muted);
  font-size: 0.9375rem;
  margin-bottom: 2rem;
}

hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 3rem 0 1.5rem;
}

footer {
  color: var(--muted);
  font-size: 0.9375rem;
}

footer a {
  color: var(--muted);
}

/* An unresolved commitment. Visible on purpose: a placeholder that looks like prose is how a
 * draft gets published with a decision still inside it. */
.decide {
  background: #fff3cd;
  color: #5c4813;
  border-left: 3px solid #d0a615;
  padding: 0.75rem 1rem;
  margin: 1rem 0;
  font-size: 0.9375rem;
}

@media (prefers-color-scheme: dark) {
  .decide {
    background: #2e2714;
    color: #e3cf8a;
  }
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--rule);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}
