/* Colours, fonts and article typography. Both the public pages and the admin
   editor load this file, so text looks the same while you edit it. */

:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #1d1c1a;
  --muted: #6b675f;
  --rule: #e3dfd6;
  --accent: #2753c4;
  --accent-soft: #e6ecfb;
  --danger: #b3261e;
  --ok: #2c7a3f;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161614;
    --surface: #1f1f1c;
    --text: #e9e6df;
    --muted: #a19c92;
    --rule: #34332f;
    --accent: #8fb0ff;
    --accent-soft: #24304d;
    --danger: #ff8a80;
    --ok: #7fd18f;
  }
}

.prose {
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--text);
  overflow-wrap: break-word;
}

.prose h1 {
  font-family: var(--sans);
  font-size: clamp(1.9rem, 4vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.8em;
}

.prose h2,
.prose h3 {
  font-family: var(--sans);
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.prose h2 { font-size: 1.4rem; margin: 2em 0 0.5em; }
.prose h3 { font-size: 1.12rem; margin: 1.6em 0 0.4em; }

.prose p,
.prose ul,
.prose ol,
.prose blockquote { margin: 0 0 1em; }
.prose ul,
.prose ol { padding-left: 1.4em; }
.prose li { margin: 0.25em 0; }

.prose blockquote {
  border-left: 3px solid var(--rule);
  padding: 0.1em 0 0.1em 1.1em;
  color: var(--muted);
  font-style: italic;
}

.prose a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
.prose a:hover { text-decoration-thickness: 2px; }

.prose sup.cite {
  font-family: var(--sans);
  font-size: 0.68em;
  line-height: 0;
  margin-left: 0.1em;
}
.prose sup.cite a { text-decoration: none; }

.prose .sources {
  margin-top: 3em;
  padding-top: 1em;
  border-top: 1px solid var(--rule);
  font-size: 0.95rem;
}
.prose .sources h2 { margin-top: 0; font-size: 1rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.prose .sources li { padding: 0.15em 0.3em; border-radius: 4px; }
.prose .sources .back { text-decoration: none; font-family: var(--sans); }

/* Jumping to a source or back to its citation briefly highlights it, so the
   eye can find the target among the other lines. */
.prose :target { background: var(--accent-soft); transition: background 1.5s ease 1s; }
