/* Every literal colour is a token; changes land in one place. */
:root { color-scheme: light dark;
  --font-body: ui-serif, Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --fg: #111;      --dim: #555;
  --bg: #fdfdfc;   --line: #e3e3e0;
  --code-bg: #f4f4f1;
  --accent: #0000ee;
}
@media (prefers-color-scheme: dark) {
  :root { --fg: #e8e8e6; --dim: #a0a09b; --bg: #16161a;
          --line: #2c2c31; --code-bg: #1e1e23; --accent: #8ab4f8; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg);
       font: 16px/1.65 var(--font-body); }
.wrap { max-width: 68rem; margin: 0 auto; padding: 2.5rem 1.25rem 3rem;
        display: grid; grid-template-columns: 14rem minmax(0, 1fr); gap: 2.75rem;
        align-items: start; }
.wrap.solo { grid-template-columns: minmax(0, 1fr); max-width: 46rem; }
main { max-width: 46rem; }
@media (max-width: 56rem) {
  .wrap, .wrap.solo { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  nav.tree ul ul { display: none; }
}

/* The index list on the left: the whole tree, all the time, in the body
   voice. Groups are bold; where you are is underlined. */
nav.tree { position: sticky; top: 2rem; font-size: .95rem; }
nav.tree ul { list-style: none; margin: 0; padding: 0; }
nav.tree ul ul { padding-left: 1rem; }
nav.tree a { color: var(--fg); text-decoration: none; display: block;
             position: relative; padding: .18rem 0 .18rem 1.45em; }
nav.tree a:hover { text-decoration: underline; text-underline-offset: 3px; }
nav.tree a.current { font-weight: 700; text-decoration: underline;
                     text-underline-offset: 3px; }
nav.tree li.group > a { font-weight: 700; }

.crumbs { font-size: .9rem; line-height: 1.65; min-height: 1.65em;
          margin-bottom: .75rem; }

/* Previous and next, in sidebar order. */
.pager { display: flex; justify-content: space-between; gap: 1.5rem;
         margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--line);
         font-size: .95rem; }
.pager .next { margin-left: auto; text-align: right; }

h1 { font-size: 2rem; letter-spacing: -.02em; line-height: 1.15;
     margin: 0 0 .4rem; }
h2 { font-size: 1.15rem; letter-spacing: -.01em; margin: 2.25rem 0 .6rem;
     clear: both; }

/* A heading links to itself. The mark keeps its space while invisible, so
   hovering a heading does not nudge the line it sits on. */
.anchor { margin-left: .35rem; font-weight: 400; text-decoration: none;
          color: var(--dim); opacity: 0; }
h2:hover .anchor, h3:hover .anchor, h4:hover .anchor,
h5:hover .anchor, h6:hover .anchor, .anchor:focus { opacity: 1; }
article > p:first-child { color: var(--dim); font-size: 1.05rem; }
p, li { margin: .6rem 0; }

a { color: var(--accent); }

/* A name, set in its own face; the face itself arrives per site, as
   .wordmark-1 and so on. Display faces run small against a serif at the same
   size, so they are nudged up to sit level with the words either side, and the
   weight is pinned because one-weight faces get smeared by a bold heading. */
.wordmark { font-weight: 400; font-size: 1.06em; letter-spacing: .01em; }
.dim { color: var(--dim); font-size: .9rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
blockquote { color: var(--dim); border-left: 2px solid var(--line);
             margin: 1rem 0; padding-left: 1rem; }

/* The tree of indexes: a section page is a listing of its children. */
ul.index { list-style: none; padding: 0; margin: 1.5rem 0; }
ul.index li { margin: 0 0 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
ul.index li:last-child { border-bottom: 0; }
ul.index span.dim { display: block; margin-top: .15rem; }

/* The copy button the one emitted script builds, sitting over its block.
   flow-root because the block it wraps is a formatting context of its own and
   steps aside for a float, while a plain div would run on underneath one and
   take the button out over the image with it. */
.codeblock { position: relative; display: flow-root; }
.codeblock pre { padding-right: 2.9rem; }
.copy { position: absolute; top: .4rem; right: .4rem; cursor: pointer;
        display: inline-flex; align-items: center; justify-content: center;
        width: 1.7rem; height: 1.7rem; padding: 0; color: var(--dim);
        background: var(--bg); border: 1px solid var(--line);
        border-radius: 4px; }
.copy:hover { color: var(--fg); }

code, pre { font-family: var(--font-mono); font-size: .875rem; }
pre { background: var(--code-bg); border: 1px solid var(--line); border-radius: 6px;
      padding: .85rem 1rem; overflow-x: auto; line-height: 1.5; }
code:not(pre code) { background: var(--code-bg); padding: .1rem .3rem; border-radius: 3px; }

table { border-collapse: collapse; width: 100%; margin: 1rem 0; font-size: .92em; }
th, td { border: 1px solid var(--line); padding: .45rem .7rem; text-align: left; vertical-align: top; }
th { background: var(--code-bg); }

footer { margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--line);
         color: var(--dim); font-size: .9rem; text-align: right; }

/* The name is the loudest thing in the column, because it is the one thing
   there that is not navigation. */
.brand { margin: 0 0 1.1rem; font-size: 1.5rem; line-height: 1.2; }
.brand a { color: var(--fg); text-decoration: none; position: relative;
           display: inline-block; padding-left: 1.25em; }

/* The mark sits in a gutter every link reserves, so the list does not shift
   as it moves from one entry to the next. */
.tree-mark { position: absolute; left: 0; top: 50%; width: 1.05em;
             height: auto; transform: translateY(-50%); }
/* The cover engraving sits beside the opening paragraph, not above it, so the
   page opens on words. It unfloats where a column that narrow would leave the
   text in a gutter. */
.cover { float: right; max-width: 45%; margin: .2rem 0 1rem 1.75rem; }
.cover img { max-width: 16rem; width: 100%; height: auto; border-radius: 6px;
             border: 1px solid var(--line); }
.cover .credit { display: block; margin-top: .4rem; font-size: .78rem;
                 line-height: 1.45; color: var(--dim); }

/* Something served from elsewhere, framed like a code block so it reads as
   part of the page rather than as a hole punched through it. */
.embed { display: block; width: 100%; height: 20rem; margin: 1.5rem 0;
         border: 1px solid var(--line); border-radius: 6px; background: var(--bg); }
@media (max-width: 40rem) {
  .cover { float: none; max-width: none; margin: .5rem 0 1.25rem;
           text-align: center; }
}

@font-face { font-family: "Manufacturing Consent"; font-style: normal;
  font-weight: 400; font-display: block;
  src: url("/manufacturing-consent-latin.woff2") format("woff2"); }
.wordmark-1 { font-family: "Manufacturing Consent", var(--font-body); }

@font-face { font-family: "IM Fell English SC"; font-style: normal;
  font-weight: 400; font-display: block;
  src: url("/im-fell-english-sc-latin.woff2") format("woff2"); }
.wordmark-2 { font-family: "IM Fell English SC", var(--font-body); }

.wordmark-3 { font-family: "IM Fell English SC", var(--font-body); }
