.katex-display, .box {
  background-color: var(--quote-bg);
  border-radius: 4px;
  padding: 0.75em 1em;
  margin: 1em 0;
  overflow-x: auto;
}

.katex-display>.katex {
  text-align: left !important;
}

#first-edition {
  margin-top: 0;
}

#of-tensor-programs {
  margin-top: -24px;
  margin-bottom: 0;
}

#of-tensor-programs+p {
  margin-top: 0;
}

#recommended-books,
#recommended-books-1,
#recommended-books-2,
#recommended-books-3,
#recommended-lectures,
#recommended-lectures-1,
#recommended-lectures-2 {
  margin-bottom: -16px;
}

#recommended-lectures,
#recommended-lectures-1,
#recommended-lectures-2 {
  margin-top: 0;
}

p:has(> em)+h5[id^="recommended-"] {
  margin-top: 0;
}

/* Standalone fully-italic paragraphs (e.g. "*Forward Pass*") sit tight.
   Keyed off the .em-only class set in custom.js, not `p:has(> em:only-child)`:
   `:only-child` ignores text nodes, so the latter also matched paragraphs with
   an inline *phrase* and surrounding text, wrongly collapsing their margins. */
p.em-only {
  margin: 0;
}

#mathematics-for-machine-learning,
#tensor-programming,
#tensor-interpretation-and-compilation {
  margin-bottom: -16px;
}

.full-bleed {
  width: 90vw;
  position: relative;
  left: 50%;
  margin-left: -45vw;
}

.full-bleed iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
}

.full-bleed-side {
  width: 90vw;
  position: relative;
  left: 50%;
  margin-left: -45vw;
  display: flex;
  gap: 1rem;
}

.full-bleed-side iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
}

.sidenote {
  float: right;
  clear: right;
  margin-right: -44%;
  width: 35%;
  margin-top: 0.3rem;
  margin-bottom: 0;
  font-size: 1.2rem;
  line-height: 1.3;
}

blockquote .sidenote {
  margin-right: calc(-44% - 20px);
}

/* Pin each defnote to the line of its term instead of float-stacking.
   Absolute + auto top keeps the note's vertical static position (the line
   where the span sits in flow), while left/width place it in the margin.
   Requires a positioned containing block: see `.content main` below. */
.defnote {
  position: absolute;
  left: -37%;
  width: 35%;
  margin-top: 0.3rem;
  margin-bottom: 0;
  font-size: 1.2rem;
  line-height: 1.3;
  text-align: right;
  /* Muted gray via opacity so it tracks --fg in both light and dark themes. */
  opacity: 0.55;
}

blockquote .defnote {
  left: calc(-37% - 20px);
}

/* Clickable defnotes: behave like header anchors (click updates URL hash). */
.defnote-link {
  cursor: pointer;
}

.sidenote-number {
  counter-increment: sidenote-counter;
}

.sidenote-number::after,
.sidenote::before {
  font-size: 1.2rem;
  position: relative;
  vertical-align: baseline;
}

.sidenote-number::after {
  content: counter(sidenote-counter);
  top: -0.5rem;
  left: 0.1rem;
  color: rgb(0, 150, 207)
}

.sidenote::before {
  content: counter(sidenote-counter) " ";
  top: -0.5rem;
  color: rgb(0, 150, 207)
}

/* Block-level float sidenotes: use data-n attribute so DOM order doesn't matter */
.sidenote-float::before,
.defnote-float::before {
  content: attr(data-n) " ";
  font-size: 1.2rem;
  position: relative;
  vertical-align: baseline;
  top: -0.5rem;
  color: rgb(0, 150, 207);
}

.sidenote-ref::after {
  content: attr(data-n);
  font-size: 1.2rem;
  position: relative;
  vertical-align: baseline;
  top: -0.5rem;
  left: 0.1rem;
  color: rgb(0, 150, 207);
}

.content {
  counter-reset: sidenote-counter;
}

/* Containing block for absolutely-positioned .defnote margin notes.
   `%` in .defnote (left/width) resolves against this text column, matching
   the geometry the old float used relative to the paragraph. */
.content main {
  position: relative;
}

/* --------------------------------------------------------------------------
   Jupyter notebook cells, emitted by preprocessors/mdbook-nb from committed,
   already-executed .ipynb files. Static In[]/Out[] blocks in the style of ISL:
   steel-blue prompts hanging in the left gutter, a cream input box (syntax
   highlighting still comes from mdBook's highlighter), warm-brown text output,
   and a pink box for tracebacks.
   -------------------------------------------------------------------------- */
:root {
  --nb-prompt: #2e6d8e;        /* In[]/Out[] labels */
  --nb-in-bg: #fdf6ec;         /* input code box */
  --nb-in-border: #e7dcc0;
  --nb-out-color: #9c4a1c;     /* text/plain + execute_result output */
  --nb-error-bg: #f7d7d9;      /* traceback box */
  --nb-error-color: #7b241c;
  --nb-stderr-bg: #fdeaea;     /* stderr stream */
  --nb-out-max-height: 22em;   /* tall outputs scroll instead of running on */
}
html.coal, html.navy, html.ayu {
  --nb-prompt: #6bb3d6;
  --nb-in-bg: #1f2733;
  --nb-in-border: #33404f;
  --nb-out-color: #e0975a;
  --nb-error-bg: #3a1c1f;
  --nb-error-color: #e0a0a0;
  --nb-stderr-bg: #2c1618;
}

.nb-cell {
  position: relative;
  margin: 0.9rem 0;
}

/* Prompts hang just left of the box (nearer than the wider .defnote margin,
   so the two never collide). */
.nb-prompt {
  position: absolute;
  left: -7rem;
  width: 6rem;
  text-align: right;
  padding-right: 0.55rem;
  font-family: var(--mono-font, "Source Code Pro", monospace);
  font-size: 0.82em;
  line-height: 1.5;
  color: var(--nb-prompt);
  white-space: nowrap;
  user-select: none;
}

.nb-in-code pre {
  background: var(--nb-in-bg);
  border: 1px solid var(--nb-in-border);
  border-radius: 4px;
}

/* Output: no box, warm-brown monospace, aligned to the code column. */
.nb-out {
  margin: 0.25rem 0 0.1rem;
}
.nb-out-text,
.nb-out-html {
  font-family: var(--mono-font, "Source Code Pro", monospace);
  font-size: 0.9em;
  line-height: 1.4;
  color: var(--nb-out-color);
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  /* Cap height so a huge print() doesn't run down the page; scroll instead. */
  max-height: var(--nb-out-max-height);
  overflow: auto;
}
/* Text output: don't wrap long lines (a one-line list/array), scroll sideways.
   HTML output (pandas tables etc.) keeps normal wrapping so cells lay out. */
.nb-out-text {
  white-space: pre;
}
.nb-out-stderr {
  background: var(--nb-stderr-bg);
  padding: 0.3em 0.5em;
  border-radius: 3px;
}
.nb-out-img img {
  max-width: 100%;
  height: auto;
}
.nb-out-html { color: inherit; }

.nb-error {
  background: var(--nb-error-bg);
  color: var(--nb-error-color);
  font-family: var(--mono-font, "Source Code Pro", monospace);
  font-size: 0.9em;
  padding: 0.3em 0.6em;
  border-radius: 3px;
  white-space: pre;
  max-height: var(--nb-out-max-height);
  overflow: auto;
}

/* Opt out of the height cap on cells tagged `full-output`: show the whole
   output, still horizontally scrollable. */
.nb-cell.nb-full .nb-out-text,
.nb-cell.nb-full .nb-out-html,
.nb-cell.nb-full .nb-error {
  max-height: none;
}

/* Below the Tufte margin breakpoint the left gutter disappears: drop prompts
   inline above their box instead of letting them hang off-page. */
@media (max-width: 1000px) {
  .nb-prompt {
    position: static;
    display: block;
    width: auto;
    text-align: left;
    padding: 0 0 0.15rem 0;
  }
}

@media (max-width: 1000px) {
  .sidenote,
  .defnote {
    display: none;
  }

  .sidenote-number::after {
    content: counter(sidenote-counter);
    cursor: pointer;
    text-decoration: underline;
  }

  .mobile-only {
    display: block;
  }

  .mobile-sidenotes {
    margin-top: 2rem;
    border-top: 1px solid currentColor;
    opacity: 0.7;
  }

  .mobile-sidenotes h6 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
  }

  .mobile-sidenotes ol {
    font-size: 1.2rem;
    line-height: 1.4;
    padding-left: 1.5rem;
    margin: 0;
  }

  .dual {
    grid-template-columns: 1fr;
  }
}

.toc ul,
.toc li {
  list-style: none;
}

.toc > ul {
  padding-left: 0;
}

.toc ul ul {
  padding-left: 2rem;
}

p:has(> small > a[href="#table-of-contents"]) {
  margin-top: 0;
}

h2:has(+ p > small > a[href="#table-of-contents"]) {
  margin-bottom: 0;
}

p:has(+ ul) {
  margin-bottom: 0;
}

.mobile-only {
  display: none;
}

.dual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
  margin: 1em 0;
}

.dual > * {
  margin: 0 !important;
}

/* Opt-in yinit drop cap (gwern-style). Wrap a paragraph in a `.dropcap` div in
   the Markdown — keep blank lines inside so mdBook renders the contents:

       <div class="dropcap">

       Opening paragraph text...

       </div>

   Only the FIRST paragraph's FIRST letter is styled; the letter must be an
   uppercase A-Z (the only glyphs yinit provides). `::first-letter` honors just
   font/float/margin/color/line-height, which is all we need here. */
.dropcap > p:first-of-type::first-letter {
  font-family: "Yinit", serif;
  font-weight: normal;
  font-style: normal;
  color: var(--fg);
  /* Fallback for browsers without initial-letter (e.g. Firefox): float the
     oversized glyph. Top isn't baseline-snapped, but it's serviceable. */
  float: left;
  font-size: 4.3em;
  line-height: 0.78;
  margin: 0.02em 0.12em 0 -0.06em;
}

/* gwern's actual technique: initial-letter snaps the cap squarely into the text
   block — cap-height to the top of line 1, baseline to line 4 — so it reads as a
   clean rectangle rather than a floated glyph poking above the first line.
   Supported in Chrome/Safari; the float above covers the rest. */
@supports (initial-letter: 4) or (-webkit-initial-letter: 4) {
  .dropcap > p:first-of-type::first-letter {
    float: none;
    font-size: inherit;
    line-height: 1;
    -webkit-initial-letter: 4;
    initial-letter: 4;
    margin: 0 0.12em 0 -0.04em;
  }
}

/* gwern's signature lead-in: the first rendered line set in small caps. Because
   it's ::first-line (not a fixed word count), it reflows with the column and
   breaks at the wrap, exactly like gwern's. The yinit ::first-letter above wins
   for the initial glyph, so only the trailing text on line 1 is affected. */
.dropcap > p:first-of-type::first-line {
  font-variant-caps: small-caps;
  font-variant: small-caps;
  letter-spacing: 0.02em;
}

/* Theme-dependent owl illustration. The default <img src> points at owl.png
   (used by the light/rust themes); these override the rendered image per theme
   via `content`. Paths are relative to this CSS file, which mdBook emits at
   theme/css/custom-*.css, so assets/ is two levels up. */
html.coal img.owl {
  content: url("../../assets/owl2.png");
}

html.navy img.owl,
html.ayu img.owl {
  content: url("../../assets/owl3.png");
}

html.navy img.owl-forest,
html.ayu img.owl-forest,
html.coal img.owl-forest {
  content: url("../../assets/owl_forest2.png");
}

/* Theme-dependent probability-space diagram, mirroring the owl swap above. */
html.coal img.probspace,
html.navy img.probspace,
html.ayu img.probspace {
  content: url("../../assets/probspace_dark.png");
}

html.coal img.probspace,
html.navy img.probspace,
html.ayu img.probspace {
  content: url("../../assets/tensors_dark.png");
}

html.coal img.randvar,
html.navy img.randvar,
html.ayu img.randvar {
  content: url("../../assets/randvar_dark.png");
}

html.coal img.randproc,
html.navy img.randproc,
html.ayu img.randproc {
  content: url("../../assets/randproc_dark.png");
}

html.coal img.chain,
html.navy img.chain,
html.ayu img.chain {
  content: url("../../assets/chain_dark.png");
}

html.coal img.stochastic_matrix,
html.navy img.stochastic_matrix,
html.ayu img.stochastic_matrix {
  content: url("../../assets/stochastic_matrix_dark.png");
}

html.coal img.venn,
html.navy img.venn,
html.ayu img.venn {
  content: url("../../assets/venn_dark.png");
}

html.coal img.venn_disjoint,
html.navy img.venn_disjoint,
html.ayu img.venn_disjoint {
  content: url("../../assets/venn_disjoint_dark.png");
}

/* Custom [!QUESTION] admonition, populated by custom.js (mdBook's built-in
   alert renderer only recognizes NOTE/TIP/IMPORTANT/WARNING/CAUTION). Reuses
   mdBook's own `.blockquote-tag`/`.blockquote-tag-title` layout, with its own
   accent color so "pause and think" prompts are visually distinguishable from
   [!WARNING]'s. Burnt-orange, matching .lemma's accent (#c9791f) above. */
:root {
  --blockquote-question-color: #c9791f;
}
html.coal, html.navy, html.ayu {
  --blockquote-question-color: #e0a458;
}

.blockquote-tag-question {
  border-inline-start-color: var(--blockquote-question-color);
}

.blockquote-tag-question .blockquote-tag-title {
  color: var(--blockquote-question-color);
}

/* URL-as-text links (wikipedia / SEP / nlab references, where the visible link
   text IS the full URL) render in CMU Typewriter — the Latin Modern Mono /
   Computer Modern typewriter face that arxiv.org/pdf/2311.04329 uses for URLs.
   Code blocks stay on --mono-font (Source Code Pro), so URLs remain distinct.
   Tagged by custom.js; scoped so it never touches code blocks or code-identifier
   links like `nanochat`/`numpy`. `.url-mono code` wins over `code` on specificity. */
a.url-mono,
a.url-mono code {
  font-family: "CMU Typewriter", monospace;
  font-weight: 400;
  font-style: normal; /* -> CMU Typewriter Text Regular (cmuntt.ttf), upright like
                          arxiv's Latin Modern Mono; `normal` overrides the italic
                          inherited from the sidenotes' *…* wrapper. */
}

/* Definition/theorem "snackbars" in the style of arxiv.org/pdf/2311.04329:
   a titled header bar, a lightly tinted body, and a thick accent rule on the
   left. Usage — leave a blank line after the opening tag so mdBook renders the
   markdown inside:

     <div class="definition" data-title="Definition 2.2.2: Probability measure">

     A **probability measure** $\mathbb{P}$ over ... such that
     1. $\mathbb{P}(\Omega) = 1$,
     2. ...

     </div>

   Use class "theorem", "lemma", or "example" for the accent-color variants. */
.definition,
.theorem,
.lemma,
.example {
  --snack-accent: #1c4a54;   /* left rule (and title, unless --snack-title-color) */
  --snack-title-bg: #cbdde3; /* header bar */
  --snack-body-bg: #ebf3f6;  /* body */
  border-left: 5px solid var(--snack-accent);
  border-radius: 3px;
  margin: 1.5em 0;
  background: var(--snack-body-bg);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

/* Red, matching the [!CAUTION] admonition's brick-red (--blockquote-caution-color
   in the light theme): dusty-rose header, pale-pink body, near-black title. */
.theorem { --snack-accent: #b52731; --snack-title-color: #64151b; --snack-title-bg: #e1a9ad; --snack-body-bg: #f4dfe0; }
/* Orange, sampled from circle A in the venn-diagram assets: burnt-orange
   rule, tan header, pale peach body, near-black title. */
.lemma   { --snack-accent: #c9791f; --snack-title-color: #4a2c0c; --snack-title-bg: #e9c9a5; --snack-body-bg: #f7ebdd; }
/* Amber/yellow, matching the original Lemma screenshot: gold rule,
   warm-yellow header, cream body, near-black title. */
.example { --snack-accent: #c8912f; --snack-title-color: #3d2f14; --snack-title-bg: #f4dfa6; --snack-body-bg: #fdf8ec; }

.definition[data-title]::before,
.theorem[data-title]::before,
.lemma[data-title]::before,
.example[data-title]::before {
  content: attr(data-title);
  display: block;
  background: var(--snack-title-bg);
  color: var(--snack-title-color, var(--snack-accent));
  font-weight: 700;
  padding: 0.5em 1em;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.definition > :not(pre),
.theorem > :not(pre),
.lemma > :not(pre),
.example > :not(pre) {
  padding-left: 1em;
  padding-right: 1em;
}

/* ol/ul need more left padding than prose: the marker gutter (numerals,
   bullets) lives inside that padding-box, and 1em is too narrow — wide
   markers like "III." get clipped against the border, reading as "I.".
   Keep the hanging-indent look but give the gutter enough room. */
.definition > ol,
.theorem > ol,
.lemma > ol,
.example > ol,
.definition > ul,
.theorem > ul,
.lemma > ul,
.example > ul {
  padding-left: 2.5em;
}

.definition > :first-child:not([data-title]),
.definition > *:nth-child(1) { margin-top: 0.75em; }
.definition > :last-child,
.theorem > :last-child,
.lemma > :last-child,
.example > :last-child { margin-bottom: 0.75em; }

/* Dark themes: dim the tints so they read as panels, not glare. */
html.coal .definition, html.navy .definition, html.ayu .definition {
  --snack-accent: #7fb3bf; --snack-title-bg: #22333a; --snack-body-bg: #1a262c;
}
html.coal .theorem, html.navy .theorem, html.ayu .theorem {
  --snack-accent: #e2707e; --snack-title-color: #f6d3d7; --snack-title-bg: #3a171b; --snack-body-bg: #2a1014;
}
html.coal .lemma, html.navy .lemma, html.ayu .lemma {
  --snack-accent: #e0975a; --snack-title-color: #f0d3b4; --snack-title-bg: #3a2814; --snack-body-bg: #2c1d10;
}
html.coal .example, html.navy .example, html.ayu .example {
  --snack-accent: #d0a94e; --snack-title-color: #e8d9b0; --snack-title-bg: #322c1c; --snack-body-bg: #262117;
}
html.coal :is(.definition,.theorem,.lemma,.example)[data-title]::before,
html.navy :is(.definition,.theorem,.lemma,.example)[data-title]::before,
html.ayu  :is(.definition,.theorem,.lemma,.example)[data-title]::before {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

/* Sidenotes inside a snackbar are relocated by custom.js into this footer and
   rendered as footnotes at the BOTTOM of the box, not in the page margin (the
   box's overflow:hidden would clip a margin float anyway). The inline
   superscript marker stays put; only the note text moves here. */
.definition .box-notes,
.theorem .box-notes,
.lemma .box-notes,
.example .box-notes {
  margin-top: 1em;
  padding-top: 0.5em;
  border-top: 1px solid rgba(0, 0, 0, 0.18);
  font-size: 0.82em;
  line-height: 1.4;
}
.box-notes .sidenote {
  float: none;
  clear: none;
  display: block; /* also overrides the <=1000px `display:none` for margin notes */
  position: relative; /* containing block for the absolutely-placed number */
  width: auto;
  margin: 0 0 0.35em 0;
  padding-left: 1.5em; /* gutter holding the number; content hangs past it */
  font-size: inherit;
}
.box-notes .sidenote:last-child { margin-bottom: 0; }
/* Footnote number: use the frozen data-n (the live CSS counter is wrong once the
   note is moved out of document order). Positioned absolutely at the top-left so
   it doesn't occupy its own line — the reference list flows up beside it. */
.box-notes .sidenote::before {
  content: attr(data-n);
  position: absolute;
  top: 0;
  left: 0;
  font-size: 0.75em;
  color: inherit;
}
html.coal .box-notes, html.navy .box-notes, html.ayu .box-notes {
  border-top-color: rgba(255, 255, 255, 0.18);
}


/* == Source logos as reference-list bullets =================================
   Each logo is defined once as a data URI (self-contained). A .ref-list renders
   references as a list whose BULLET is the source logo, picked from each link's
   destination and hung into the indent (wrapped URLs align cleanly). PCM has no
   domain/favicon, so it's matched by its book DOI (9781400830398) and drawn as a
   masked nautilus shell that tints with the text color. */
:root {
  --logo-mathworld:  url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAKSElEQVRoge2Ye3SV1ZnGf8/+vnNObifQhLsXUEAuRlAQULxSrVWpraVaLg5YdDnVDg5xwJnWUU/jtFW0rZVI27S6ABGF4HJaqjhddNphqrNgIVC5VcDBCwEkICQhyck5Od9+54+D7VqdtZJwaf/K8++3vr2fZ7/vu/f7PtCNbnSjG904Deivs6yJ1Lf//9pVVQbYmdzpzAlIpUKSw/uT0EiwCeAGI4pPfPXAYYydEG3gSOY9qmY3nIltT19AqraEXlyEMQVnNwODMRxSK2YZZIWgYsDyh6/jwAYi/0uCaA1bWw7ws6+3/+0F1NTEyJWNw9vdyK4HBiA5zNJgn2BsAw5hjEKqQMqAlQBtQBysDdNOzF7FZ1ZQOWsf6KTT69QEPPVCMYUFszA/F2kgqBlsN9AT2VIi2wbmwF2F03TQe+CHgAYgWjEa8tHRoBOC3sSiR5kzfRM6ORHBSZN/traEwM0HHsKpJ95Wgd2P3Ot4q8CxDC+Hs6FIYxBDwI6DCzBiSKUnUqoYqRGUxGw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pjxYQTjQbTiMG4BZwD9swrJggNf6EPm/we6ICNADxdu+YARcbQf4xILcA9KqgAB47hBhA2BxG6g0BuEOIVfzfA45rADNtkTkJD4k5B+uKZ8O1TtNhb+WctnXdegm2mZCXglWNaC2VH1BYwFoL48QptfGZzk4m/0m7xq1qYa1Qkkrh/MshmIObA1w9eoBubhbhYsfPEfB2Z0xyrJqAG2WGAUb3C2fvVDClggJ2QAJXaTOgd4fl60lbAI+K9o2fbYDWZcEzGTYBsDw6AHaMxuxkgxDDy33cBpgTSdV0WJo6QLzlQkfcnaufl16XA8cm/4Kg+ruxpdWpc4+sWmZu7aXUPMJgyOj8sBO84uLRCAq5bWypPWVClk1EFI3+n61jT7e+dmwuSZEnyaWR3e6D9/Lirf3hwP3KV/5JfgDkFRJivFlZxgAAAABJRU5ErkJggg==");
  --logo-pcm:        url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAilBMVEX////yjTDzkB3yiyzzmk3++fPzjRD97NzzigD2sWzxhhf74tPxhx/5z67xhRLzjhf2tYD1oEP4v4n0lif859b5zKLzlUD+8+ryiyb4w5n4xJLykTT4yaTyhgD1qGj1rXL617v3u4373cX1pE/0n1b606z0nDj1qVr0o173un785M761rTxfwD2rWJzOlF8AAACBklEQVRYhe2XXXejIBCGESJalmC6GoMxnyabtun2//+9ZYYkp3vOINr20veKo8PDzDAwytikH9SvHlWrAYDaqLB0spvHIDOR9EgIrXfVNwAgq/Z9XiBAB2Q93dpDBLCZk2r2rbEYiWn6ACJJg6+zo0aEWnwRwFi6UOCkCvkQBTB2wFSo7ssAVglHEC1t9QBksiz5EzxaFiWIl6d1diMo2KpjBJAXhfQAN/LKt09+2TkQDFkOnwCc3wH8oZx7J84uCE3mkQTcHABCwXHdq4IsDAT8uTyjLrl0BPlyt0sMdSoIwEPZCwST4/5ttIthMxLA2Ie8P4SNsPvRgJUDFCW8TqEUzqMB7OQymWMaa2dYjwdADN8CXJwHEkNoneFsNKBzD4sLjFbuVIvXsYCMQwrWMIRKstSlQADSzKtaSyhGn4IG6mA+DLDc5jfhaViiXQ2VmA0EfDpMPPdRdXAWqE2IAOT2zZu1IlDJdAgS5WI4Xb3V0WVAWPJKIgDd22/U+v1+gxzwRiIdiBWSn6+hu1BVNAzQwL0uNLUFQwDVDNZPzIGeHzvO72eD/dFQNRQCdIubXmutcbpQofVJwMZYL+Gbs9CzQPwhgP7vG0OLcGuOAYTVqm36Gx8F+Gu8VLtr+r9vaED6UGxyADBOE2ACTAAv/OVBgOuI24/xgKxygkF6dYOeq2vSj+sfqlooEnLksIYAAAAASUVORK5CYII=");
}
.ref-list { display: block; margin: 0; padding-left: 0; } /* indent comes from .sidenote's gutter */
.ref-item { display: block; padding-left: 1.5em; margin: 0.2em 0; line-height: 1.35; }
/* Whole reference list in CMU Typewriter Text Regular, upright — matching
   arxiv's Latin Modern Mono URL style (deterministic; also covers the non-URL
   PCM citation, keeping the list uniform). */
.ref-item a { font-family: "CMU Typewriter", monospace; font-weight: 400; font-style: normal; }
.ref-item a[href*="mathworld.wolfram.com"]::before,
.ref-item a[href*="wikipedia.org"]::before,
.ref-item a[href*="grokipedia.com"]::before,
.ref-item a[href*="9781400830398"]::before {
  content: "";
  display: inline-block;
  width: 1em; height: 1em;
  margin-left: -1.5em;   /* hang into the .ref-item indent, acting as the bullet */
  margin-right: 0.5em;
  vertical-align: -0.15em;
  background: center/contain no-repeat;
}
.ref-item a[href*="mathworld.wolfram.com"]::before { background-image: var(--logo-mathworld); }
.ref-item a[href*="wikipedia.org"]::before        { background-image: var(--logo-wikipedia); }
.ref-item a[href*="grokipedia.com"]::before       { background-image: var(--logo-grokipedia); }
.ref-item a[href*="9781400830398"]::before        { background-image: var(--logo-pcm); }
/* Dark themes: the black Wikipedia W would vanish — flip it to white. */
html.coal .ref-item a[href*="wikipedia.org"]::before,
html.navy .ref-item a[href*="wikipedia.org"]::before,
html.ayu  .ref-item a[href*="wikipedia.org"]::before { filter: invert(1) brightness(1.7); }
