/* See DESIGN.md. Two layers: the authors' text (serif) and the machine chrome (mono). */
:root {
  --bg: #0b0d11;
  --bg-raised: #12161c;
  --fg: #d6dbe2;
  --muted: #7d8a99;
  --rule: #232a33;
  --steel: #8fa3b8;
  --red: #d9382c;
  --link: #a9bccf;
  --serif: Charter, "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #e4e7eb;
    --bg-raised: #d8dce2;
    --fg: #161a20;
    --muted: #5a6675;
    --rule: #c3c9d1;
    --steel: #4a5c70;
    --red: #b8281e;
    --link: #2f4a68;
  }
}

* { box-sizing: border-box; }
html { background: var(--bg); color: var(--fg); }
body {
  margin: 0;
  padding: 0 16px;
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: .15em; }
a:hover { text-decoration-thickness: 2px; }

/* ---- machine layer: header, status line, footer ---- */
header.site, .status, main, footer.site { max-width: 40em; margin: 0 auto; }
header.site {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 1.2rem 0 .6rem;
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}
header.site .name { color: var(--fg); text-decoration: none; letter-spacing: .14em; font-size: .8rem; }
header.site .name span { color: var(--red); }
header.site nav { white-space: nowrap; }
header.site nav a { color: var(--muted); text-decoration: none; margin-left: 1em; }
header.site nav a:hover { color: var(--fg); }
.status {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted);
  padding: .3rem 0 .5rem;
  border-bottom: 1px solid var(--red);
}
footer.site {
  margin-top: 4rem; padding: 1.2rem 0 3rem;
  border-top: 1px solid var(--rule);
  font-family: var(--mono); font-size: .75rem; line-height: 1.6; color: var(--muted);
}
footer.site a { color: var(--steel); }

/* ---- human layer: text ---- */
main { padding-top: 2rem; }
h1 { font-size: 1.9rem; line-height: 1.15; margin: .2em 0 .7em; font-weight: 600; letter-spacing: -.01em; }
h1.display {
  font-family: var(--sans); font-weight: 900; text-transform: uppercase;
  letter-spacing: -.02em; font-size: 2.6rem; line-height: 1; margin: .1em 0 .6em;
}
h2 { font-size: 1.25rem; margin: 2.2em 0 .6em; font-weight: 600; }
h3 { font-size: 1.05rem; margin: 1.8em 0 .4em; font-weight: 600; }
h4 { font-family: var(--mono); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 2.2em 0 .6em; }
p, ul, ol, blockquote { margin: 0 0 1em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin-bottom: .35em; }
blockquote {
  margin-left: 0; padding: .1em 0 .1em 1em;
  border-left: 1px solid var(--steel);
}
blockquote blockquote { border-left-color: var(--rule); }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5em 0; }
img { max-width: 100%; height: auto; display: block; margin: 1.5em auto; }
em { font-style: italic; }
sup { line-height: 0; font-size: .75em; }
.lede { font-size: 1.15rem; color: var(--muted); }

/* ---- machine layer: labels ---- */
.crumb, .kicker, .source, .byline, .muted, .count, .label, .dateline, .summary {
  font-family: var(--mono); font-size: .75rem; color: var(--muted); letter-spacing: .06em;
}
.crumb, .kicker, .count, .label, .dateline { text-transform: uppercase; letter-spacing: .12em; }
.crumb a, .source a { color: var(--steel); }
.kicker { margin-bottom: .2em; }
.source { margin-top: 2.5rem; }
.count { margin-left: .5em; }
.summary { text-transform: none; letter-spacing: .02em; font-size: .8rem; margin: .3em 0 0; line-height: 1.5; }
.dateline { margin: -.2em 0 1em; }
.noted { color: var(--red); font-size: .8em; }

section.chapters ol, section.chapters ul { list-style: none; padding: 0; margin: 0; }
section.chapters li { padding: .55em 0; border-top: 1px solid var(--rule); }
section.chapters li:last-child { border-bottom: 1px solid var(--rule); }
section.chapters .label { margin-right: .5em; }
section.chapters h2 { font-family: var(--mono); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* ---- the readout: the machine layer's only container ---- */
.readout {
  margin: 2.5rem 0 0;
  padding: .9rem 1.1rem .3rem;
  background: var(--bg-raised);
  border: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: .9rem;
  line-height: 1.55;
}
.readout-label {
  font-size: .7rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 .8em;
}
.readout-label::before { content: "▮ "; color: var(--red); }
.readout.banner { margin: 0 0 1.8rem; padding-bottom: .1rem; }
.readout.banner .readout-label { margin: 0 0 .3em; }
.readout.human { font-family: var(--serif); font-size: 1.0625rem; }
.readout.placeholder p:not(.readout-label) { color: var(--muted); font-style: italic; }
.readout a { color: var(--link); }

section.discussed { margin-top: 2.5rem; font-family: var(--mono); font-size: .8rem; }
section.discussed h2 { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 .6em; }
section.discussed ul { list-style: none; padding: 0; margin: 0; }
section.discussed li { padding: .3em 0; }
section.discussed a { color: var(--steel); }

nav.pager {
  display: flex; justify-content: space-between; gap: 1.5em;
  margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--rule);
  font-family: var(--mono); font-size: .8rem;
}
nav.pager a { color: var(--steel); text-decoration: none; max-width: 48%; }
nav.pager a:hover { color: var(--fg); }
nav.pager .next { text-align: right; margin-left: auto; }

section.reviews article.review { padding: 1.2em 0; border-top: 1px solid var(--rule); }
section.reviews h2 { font-family: var(--mono); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
section.reviews h3 { margin-top: 0; }
section.reviews blockquote { font-size: .95rem; color: var(--muted); }

.footnotes { margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--rule); font-size: .92rem; color: var(--muted); }
.footnotes-sep { display: none; }
.footnotes ol { padding-left: 1.4em; }
.footnote-backref { text-decoration: none; margin-left: .3em; }

@media (max-width: 480px) {
  body { font-size: 1rem; }
  h1 { font-size: 1.55rem; }
  h1.display { font-size: 2rem; }
  header.site { flex-direction: column; gap: .5rem; }
  header.site nav a { margin-left: 0; margin-right: 1.2em; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
