/* The tokens are the app's, taken from the same ElectricSheepKit colorsets the
   landing page uses, so a repainted palette moves all three together rather
   than leaving the documents behind. Kept in one file because — unlike the
   landing page, which is a bespoke thing and stays self-contained — these are
   ordinary prose pages and there will be more of them, one pair per app. */

:root {
  --ground: #f1f0f7;
  --surface: #ffffff;
  --ink: #16161c;
  --muted: #656f82;
  --accent: #5b45f5;
  --hairline: #dcd9e8;

  --display: Optima, "Gill Sans", "Gill Sans MT", Candara, "Trebuchet MS", sans-serif;
  --passage: "Iowan Old Style", Charter, "Palatino Linotype", Palatino, Georgia, serif;
  --utility: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;

  --measure: 36rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #0e0e12;
    --surface: #17171e;
    --ink: #f5f5f8;
    --muted: #9aa1b0;
    --accent: #8e7bff;
    --hairline: #2b2b36;
  }
}

:root[data-theme="dark"] {
  --ground: #0e0e12;
  --surface: #17171e;
  --ink: #f5f5f8;
  --muted: #9aa1b0;
  --accent: #8e7bff;
  --hairline: #2b2b36;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: clamp(2rem, 7vh, 4.5rem) 1.25rem clamp(3rem, 9vh, 5rem);
  background: var(--ground);
  color: var(--ink);
  font-family: var(--passage);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

main, header, footer { width: min(100%, var(--measure)); margin-inline: auto; }

.eyebrow {
  font-family: var(--utility);
  font-size: 0.75rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.75rem;
}

h1 {
  font-family: var(--display);
  font-size: clamp(1.9rem, 5.5vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.014em;
  margin: 0 0 0.5rem;
}

h2 {
  font-family: var(--display);
  font-size: clamp(1.2rem, 3vw, 1.4rem);
  line-height: 1.25;
  letter-spacing: -0.008em;
  margin: 2.75rem 0 0.75rem;
}

h3 {
  font-family: var(--display);
  font-size: 1.0625rem;
  margin: 1.75rem 0 0.35rem;
}

p, ul, dl { margin: 0 0 1rem; }
ul { padding-left: 1.2rem; }
li { margin-bottom: 0.4rem; }

.lede { font-size: 1.1875rem; color: var(--ink); }
.dateline { font-family: var(--utility); font-size: 0.8125rem; color: var(--muted); }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.15em; }

/* The one claim on either page that a reader should be able to find without
   reading the page: it is set apart rather than emphasised inside a paragraph. */
.plainly {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--accent);
  border-radius: 0.5rem;
  padding: 1rem 1.15rem;
  margin: 1.5rem 0 2rem;
}
.plainly p { margin: 0; }
.plainly p + p { margin-top: 0.6rem; }

dt { font-family: var(--display); font-weight: 600; margin-top: 1.1rem; }
dd { margin: 0.1rem 0 0; color: var(--ink); }

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

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

.backlink {
  display: inline-block;
  font-family: var(--utility);
  font-size: 0.8125rem;
  letter-spacing: 0.03em;
  margin-bottom: 2rem;
  text-decoration: none;
}
.backlink:hover { text-decoration: underline; }
