/* One readable column, large text, strong contrast, links always underlined, and a clear focus outline.
   Colours follow the reader's light or dark setting. No web fonts and no scripts. */
:root {
  --text: #1b1b1b;
  --muted: #4a4a4a;
  --background: #fdfcf9;
  --surface: #f1eee6;
  --link: #0b4f9c;
  --visited: #5a2d82;
  --focus: #c25100;
  --rule: #d6d1c4;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --text: #ecebe6;
    --muted: #c3c0b8;
    --background: #161614;
    --surface: #24231f;
    --link: #8cc4ff;
    --visited: #d2b3ff;
    --focus: #ffb067;
    --rule: #45433d;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 112.5%; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.65;
}
header.site, main, footer.site { max-width: 40rem; margin: 0 auto; padding: 0 1rem; }
main { padding-top: 1rem; padding-bottom: 3rem; }
main:focus { outline: none; }

/* Skip link: visible as soon as it has focus */
.skip { position: absolute; left: -999px; top: 0; padding: .5rem 1rem; background: var(--text); color: var(--background); z-index: 1; }
.skip:focus { left: 1rem; top: 1rem; }

header.site { border-bottom: 1px solid var(--rule); }
header.site ul { list-style: none; margin: 0; padding: 1rem 0; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
header.site .name { font-weight: 700; }
header.site [aria-current="page"] { text-decoration-thickness: 3px; }
footer.site { border-top: 1px solid var(--rule); color: var(--muted); padding-top: 1rem; padding-bottom: 2rem; font-size: .9rem; }

a { color: var(--link); text-decoration: underline; text-underline-offset: .15em; }
a:visited { color: var(--visited); }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }

h1, h2, h3 { line-height: 1.25; margin: 2rem 0 .75rem; }
h1 { font-size: 2rem; margin-top: 1rem; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.15rem; }
p, ul, ol, dl, pre { margin: 0 0 1rem; }
li { margin-bottom: .4rem; }
img { max-width: 100%; height: auto; }
/* Pictures in a note: never taller than most screens, centred in the column */
article img { display: block; max-height: 28rem; width: auto; margin: 1.5rem auto; border-radius: 4px; }

.kind { color: var(--muted); margin: 1rem 0 0; font-size: .95rem; }
.kind + h1 { margin-top: .25rem; }
.draft { background: var(--surface); border-left: 4px solid var(--focus); padding: .5rem .75rem; }
.draft-tag, .date { color: var(--muted); }
.notes { list-style: none; padding: 0; }
.notes li { margin-bottom: 1.25rem; }
.notes p { margin: .2rem 0 0; color: var(--muted); }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: .25rem 1rem; background: var(--surface); padding: .75rem 1rem; border-radius: 4px; }
.facts dt { font-weight: 600; }
.facts dd { margin: 0; overflow-wrap: anywhere; }

pre { background: var(--surface); padding: .75rem 1rem; overflow-x: auto; font-size: .85rem; border-radius: 4px; }
code { font-family: ui-monospace, Consolas, "Courier New", monospace; }
blockquote { margin: 0 0 1rem; padding-left: 1rem; border-left: 4px solid var(--rule); color: var(--muted); }

.ref a { text-decoration: none; padding: 0 .1em; }
.references { border-top: 1px solid var(--rule); margin-top: 2rem; font-size: .95rem; }
.references p { display: inline; }
.back { margin-left: .25rem; }

.profile h1 { font-size: 2.2rem; }
/* Name, tagline and photo centred together; the text below stays left-aligned for easy reading */
.profile h1, .profile h1 + p { text-align: center; }
.profile h1 + p { font-size: 1.15rem; }
.profile img { display: block; width: 14rem; max-width: 70%; border-radius: 6px; margin: 1.5rem auto; }
.byline { color: var(--muted); margin: -.25rem 0 1rem; }
.themes-list { list-style: none; padding: 0; display: grid; gap: .5rem; }
.themes-list li { margin: 0; }
