:root {
  color-scheme: light;
  --paper: #faf9f6;
  --ink: #252525;
  --muted: #65635d;
  --line: #c9c6be;
  --link: #173fbe;
}
* { box-sizing: border-box; }
html { background: var(--paper); color: var(--ink); scrollbar-gutter: stable; }
body { margin: 0; font-family: "Courier New", Courier, "Liberation Mono", monospace; font-size: 16px; line-height: 1.65; }
.page { max-width: 850px; margin: 0 auto; padding: 55px 30px 24px; }
/* Wide layout: text, code, rules and tables keep the column of every other page; only the
   interactive figures break out symmetrically to both sides, up to 1080px. */
.page-wide .interactive-figure { --breakout: max(100%, min(1080px, 100vw - 80px)); width: var(--breakout); margin-left: calc((100% - var(--breakout)) / 2); }
/* A figure is laid out as a table whose only cell is the image and whose caption sits below:
   the caption is then exactly as wide as the picture. Images are shown at the size of their
   width attribute and only ever scaled down. */
.static-figure { display: table; max-width: 100%; margin: 16px 0 36px; }
.static-figure img { display: block; max-width: 100%; height: auto; }
.static-figure figcaption { display: table-caption; caption-side: bottom; font-size: 13px; color: var(--muted); padding-top: 8px; }
/* .full-width: a vector graphic scaled to the width of the text column, with more room around
   it so that a figure does not run into the text or the next figure. */
.static-figure.full-width { display: block; margin: 32px 0 44px; }
.static-figure.full-width img { width: 100%; }
.static-figure.full-width figcaption { display: block; padding-top: 12px; }
.figure-index { columns: 2; font-size: 14px; margin: 24px 0 35px; }
.figure-index li { break-inside: avoid; }
.interactive-figure { margin: 16px 0 42px; }
.interactive-figure iframe { display: block; width: 100%; height: 620px; border: 0; background: var(--paper); }
.interactive-figure.figure-tall iframe { height: 960px; }
.interactive-figure.figure-bands iframe { height: 820px; }
.interactive-figure.figure-nuclear iframe { height: 640px; }
.interactive-figure.figure-nuclear-short iframe { height: 560px; }
/* The world map page sets the height of its own frame from its width. */
.interactive-figure.figure-nuclear-map iframe { height: 500px; }
.interactive-figure.figure-location-map iframe { height: 640px; }
.interactive-figure.figure-central-path iframe { height: 940px; }
/* The centering page sets the height of its own frame from its content. */
.interactive-figure.figure-method iframe { height: 900px; }
.interactive-figure.figure-policy iframe { height: 560px; }
/* Both figures of the note on constrained optimisation also set the height of their frame. */
.interactive-figure.figure-problem iframe { height: 650px; }
.interactive-figure.figure-active iframe { height: 640px; }
.interactive-figure.figure-descent iframe { height: 660px; }
.interactive-figure.figure-balance iframe { height: 740px; }
.interactive-figure.figure-plan iframe { height: 790px; }
/* A long code block folded away behind a summary line, e.g. a full script after its excerpts. */
.code-details { margin: 18px 0; }
.code-details summary { cursor: pointer; font-size: 14px; color: var(--link); padding: 6px 0; }
.code-details[open] summary { margin-bottom: 8px; }
.interactive-figure figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 5px 20px; font-size: 12px; margin-top: 8px; color: var(--muted); }
.interactive-figure figcaption a { white-space: nowrap; }
.interactive-figure figcaption span { flex-basis: 100%; font-size: 14px; color: var(--ink); }
.figure-description, .figure-takeaway { display: flex; align-items: baseline; gap: 12px; font-size: 14px; margin-bottom: 12px; }
.figure-description { color: var(--muted); }
.figure-symbol { flex: 0 0 1.4em; text-align: center; line-height: 1.4; border: 1px solid var(--line); border-radius: 50%; font-weight: bold; }
.figure-takeaway .figure-symbol { color: var(--link); border-color: var(--link); }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:visited { color: #654386; }
a:hover { color: var(--ink); background: #eae7df; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--link); outline-offset: 4px; }
.skip-link { position: absolute; top: 5px; left: 10px; transform: translateY(-160%); background: var(--paper); z-index: 2; }
.skip-link:focus { transform: none; }
.site-header { padding-bottom: 23px; border-bottom: 1px solid var(--ink); margin-bottom: 35px; }
.site-name, .site-name:visited { font-size: clamp(25px, 4.7vw, 32px); font-weight: 700; letter-spacing: -1.3px; color: var(--ink); text-decoration: none; line-height: 1.2; }
.cursor { color: var(--link); }
.tagline { font-size: 13px; color: var(--muted); margin: 9px 0 22px; }
nav { display: flex; flex-wrap: wrap; gap: 5px 19px; font-size: 14px; }
nav a[aria-current="page"] { color: var(--ink); font-weight: 700; text-decoration: none; }
nav a[aria-current="page"]::before { content: "["; }
nav a[aria-current="page"]::after { content: "]"; }
h1, h2, h3 { line-height: 1.35; }
h1 { font-size: 26px; letter-spacing: -0.6px; margin: 0 0 18px; }
h2 { font-size: 18px; margin: 35px 0 15px; }
h3 { font-size: 16px; margin: 26px 0 10px; }
p { margin: 0 0 18px; }
ul, ol { padding-left: 24px; }
li { margin-bottom: 7px; }
strong { font-weight: 700; }
.eyebrow, .meta, .section-label { font-size: 12px; color: var(--muted); }
.eyebrow { margin-bottom: 10px; }
.intro { max-width: 70ch; }
.intro h1 { font-size: 20px; }
.intro p { margin-bottom: 14px; }
.current { display: grid; grid-template-columns: 90px 1fr; gap: 12px; margin: 26px 0 36px; font-size: 14px; padding: 12px 0; border-block: 1px dotted var(--line); }
.current p { margin: 0; }
.current-label { color: var(--muted); }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 32px; border-bottom: 1px solid var(--line); padding-bottom: 7px; }
.section-heading h2 { margin: 0; }
.section-heading > a { font-size: 12px; white-space: nowrap; }
.entry-list { list-style: none; padding: 0; margin: 8px 0 23px; }
.entry { padding: 12px 0; margin: 0; border-bottom: 1px dotted var(--line); }
.entry:last-child { border-bottom: 0; }
.entry-line { display: grid; grid-template-columns: 94px 1fr auto; gap: 10px; align-items: baseline; }
.entry time, .entry-kind { font-size: 12px; color: var(--muted); }
.entry-title { font-size: 15px; }
.entry-description { margin: 5px 0 0 104px; color: var(--muted); font-size: 13px; }
.project-list .entry { padding: 14px 0; }
.undated .entry-line { grid-template-columns: 1fr auto; }
.undated .entry-description { margin-left: 0; }
.project-list .entry > .tags { margin-left: 104px; }
.project-list .undated > .tags { margin-left: 0; }
.tags { font-size: 12px; color: var(--muted); margin-top: 6px; }
.tags span + span::before { content: " / "; }
.section-intro { color: var(--muted); max-width: 66ch; }
.aside-note { font-size: 13px; color: var(--muted); }
.article-header { margin-bottom: 27px; }
.article-header h1 { margin-bottom: 12px; }
.article-header .meta { margin-bottom: 5px; }
.article-body { overflow-wrap: anywhere; }
.article-body h2 { border-bottom: 1px dotted var(--line); padding-bottom: 7px; }
.article-body img, .article-body video, .article-body iframe { max-width: 100%; }
.article-body img { height: auto; }
.article-body blockquote { border-left: 2px solid var(--line); margin: 20px 0; padding-left: 18px; color: var(--muted); }
.article-body table { border-collapse: collapse; display: block; overflow-x: auto; font-size: 14px; margin-bottom: 20px; }
/* "anywhere" would let narrow columns split short words ("Fakt|or"); tables scroll instead. */
.article-body th, .article-body td { overflow-wrap: break-word; }
th, td { text-align: left; border-bottom: 1px solid var(--line); padding: 8px 13px 8px 0; }
code, pre, button, input, select { font: inherit; }
code { font-size: .9em; background: #efede7; padding: 2px 4px; }
pre { padding: 16px; background: #efede7; border: 1px solid #e1ddd4; overflow-x: auto; font-size: 13px; line-height: 1.6; }
pre code { padding: 0; font-size: inherit; }
.math-block { overflow-x: auto; padding: 18px 0; margin: 12px 0; }
/* Formulas are set in Latin Modern Math, the math font of LaTeX (assets/fonts/README.md), so they look
   the same everywhere: many phones, Android above all, have no math font, and MathML then falls back
   to text glyphs with poorly fitting fraction bars, roots and brackets. */
@font-face { font-family: "Latin Modern Math"; src: url(/assets/fonts/latinmodern-math.woff2) format("woff2"); font-display: swap; }
math { font-family: "Latin Modern Math", math; font-size: 1.15em; }
/* \boxed{…} becomes <menclose notation="box">, which MathML Core (Chromium) draws without a frame. */
menclose[notation="box"] { border: 1px solid currentColor; padding: .3em .45em; }
.math-inline { white-space: nowrap; }
/* MathML Core (Chromium) ignores columnalign and columnspacing; align*, cases and array set
   them per cell. In align* (columnspacing "0em 2em ...") each right-aligned cell meets the
   left-aligned cell after it without a gap, and pairs of columns are 2em apart. */
mtd[columnalign="left"] { text-align: left; }
mtd[columnalign="right"] { text-align: right; }
mtable[columnspacing^="0em"] > mtr > mtd:nth-child(odd) { padding-right: 0; }
mtable[columnspacing^="0em"] > mtr > mtd:nth-child(even) { padding-left: 0; }
mtable[columnspacing^="0em"] > mtr > mtd:nth-child(odd):not(:first-child) { padding-left: 2em; }
/* CSS-only language tabs: each radio is immediately followed by its own label and
   panel, so plain adjacent-sibling selectors show the checked one. No JS needed. */
.code-tabs { display: flex; flex-wrap: wrap; align-items: center; margin: 18px 0; }
.code-tab-input { order: 0; accent-color: var(--link); cursor: pointer; margin: 0 6px 10px 0; }
.code-tab-label { order: 0; margin: 0 18px 10px 0; font-size: 13px; color: var(--muted); cursor: pointer; }
.code-tab-input:checked + .code-tab-label { color: var(--ink); font-weight: 700; }
.code-tab-panel { order: 1; flex-basis: 100%; display: none; margin: 0; }
.code-tab-input:checked + .code-tab-label + .code-tab-panel { display: block; }
/* Highlighted at build time by Pygments (tabbed and plain fenced code alike); a small set
   of token classes, colored with the accent palette already used in the notes. */
pre .c, pre .c1, pre .cm { color: var(--muted); font-style: italic; }
pre .k, pre .kn, pre .kc, pre .ow, pre .kd, pre .kr { color: var(--link); font-weight: 700; }
pre .s, pre .s1, pre .s2, pre .sd, pre .sa, pre .si, pre .se { color: #b95a28; }
pre .mi, pre .mf, pre .mh { color: #426f6b; }
pre .nf, pre .nc { color: #685d94; font-weight: 700; }
pre .nd { color: #685d94; }
.article-footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px 24px; margin-top: 38px; padding-top: 15px; border-top: 1px solid var(--line); font-size: 13px; }
.article-footer p { margin: 0; }
.support { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; color: var(--muted); }
.support-link, .support-link:visited { display: inline-flex; align-items: center; gap: 8px; padding: 6px 13px 6px 9px; border: 1px solid var(--line); border-radius: 999px; background: #efede7; color: var(--ink); font-size: 12px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.support-link:hover, .support-link:focus-visible { border-color: var(--ink); background: #eae7df; color: var(--ink); }
.support-link img { width: 18px; height: 18px; display: block; border-radius: 4px; }
.site-footer { border-top: 1px solid var(--ink); margin-top: 48px; padding-top: 16px; font-size: 12px; }
.site-footer p { margin: 0 0 5px; }
.colophon { color: var(--muted); }
::selection { background: #dddfe9; }
@media (max-width: 560px) {
  .figure-index { columns: 1; }
  .interactive-figure iframe { height: 540px; }
  .interactive-figure.figure-tall iframe { height: 850px; }
  .interactive-figure.figure-plan iframe { height: 950px; }
  .interactive-figure.figure-nuclear iframe, .interactive-figure.figure-nuclear-short iframe { height: 520px; }
  math { font-size: 1.1em; }
  body { font-size: 15px; }
  .page { padding: 28px 19px 20px; }
  .site-header { margin-bottom: 27px; }
  .tagline { font-size: 11px; }
  nav { gap: 5px 14px; font-size: 13px; }
  h1 { font-size: 23px; }
  .current { grid-template-columns: 1fr; gap: 3px; }
  .entry-line { grid-template-columns: 1fr auto; gap: 2px 8px; }
  .entry-line time { grid-column: 1 / -1; }
  .entry-description { margin-left: 0; }
  .project-list .entry > .tags { margin-left: 0; }
  .section-heading { flex-wrap: wrap; gap: 4px; }
  .entry-kind { font-size: 11px; }
}
@media print {
  html { background: white; }
  .page { max-width: none; padding: 0; }
  nav, .skip-link, .article-footer { display: none; }
  a, a:visited { color: inherit; }
  .site-footer { margin-top: 25px; }
}
