/* Article styling. The measure (720px), accent, 18px base and the 600px
   breakpoint are carried over from blog/build.py so the two pieces look
   related; everything below .fig is new (the blog article had no figures,
   audio or TODO boxes). */

:root {
  --ink: #1f2933;
  --muted: #52606d;
  --accent: #d1495b;
  --rule: #e4e7eb;
  --todo-bg: #fff8db;
  --todo-edge: #e3c96b;
  --todo-ink: #6b5411;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: #fafafa;
  color: var(--ink);
  font-family: -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.65;
  font-size: 18px;
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 22px 64px;
  background: #fff;
}

h1 { font-size: 2.1rem; line-height: 1.15; margin: 0 0 .4em; letter-spacing: -.02em; }
h2 {
  font-size: 1.5rem;
  margin: 2.4em 0 .6em;
  letter-spacing: -.01em;
  padding-top: .4em;
  border-top: 1px solid var(--rule);
}
h3 { font-size: 1.2rem; margin: 2em 0 .5em; }
p { margin: 0 0 1.1em; }
em { color: var(--muted); }
strong { color: var(--ink); }
a { color: var(--accent); }
ul { padding-left: 1.2em; }
li { margin: 0 0 .35em; }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .9em;
  background: #f3f4f6;
  padding: .1em .3em;
  border-radius: 3px;
}

/* Figures break out of the text measure a little -- most of them are wide
   rasters and strip charts. Clicking one opens the full-size PNG. */
.fig {
  margin: 1.8em 0 2.2em;
  width: 100%;
}
.fig img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  border-radius: 4px;
}
.fig figcaption {
  margin-top: .5em;
  font-size: .85rem;
  color: var(--muted);
  line-height: 1.45;
}

.clip { margin: -1.4em 0 2.2em; }
.clip audio { width: 100%; display: block; }

/* Unresolved placeholders. Visible on purpose: the live page doubles as the
   progress bar while the article is being written. build.py --strict fails the
   build once these must all be gone. */
.todo {
  background: var(--todo-bg);
  border: 1px dashed var(--todo-edge);
  color: var(--todo-ink);
  border-radius: 3px;
  font-size: .9em;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
span.todo { padding: .05em .35em; }
div.todo { display: block; padding: .6em .8em; margin: 1.2em 0; }
div.todo::before, span.todo::before { content: "TODO "; font-weight: 700; opacity: .65; }

footer {
  max-width: 720px;
  margin: 0 auto;
  padding: 18px 22px 64px;
  color: var(--muted);
  font-size: .85rem;
}
footer a { color: var(--muted); }

@media (max-width: 600px) {
  body { font-size: 16px; }
  main { padding: 32px 16px 48px; }
  h1 { font-size: 1.7rem; }
}
