.numerics-post {
  --font-body: var(--site-font);
  --font-head: var(--site-font);
  --font-meta: var(--site-font);
  --font-ui: var(--site-font);
  --text: var(--site-ink);
  --rule: var(--site-line);
  --inline-bg: var(--site-hover);
  --text-w: 780px;
  --gutter: 0px;
  --margin-w: 0px;
}
.numerics-post .l-grid {
  width: min(var(--text-w), calc(100% - 48px)); margin-inline: auto;
  grid-template-columns: [screen-start page-start text-start] minmax(0,1fr)
    [text-end page-end screen-end];
}
.numerics-post .byline-grid { grid-column: text; }
.numerics-post .d-title { padding-top: 35px; }
.numerics-post .d-title h1 { grid-column: text; margin-bottom: 14px; }
.numerics-post .d-title .subtitle { margin-bottom: 24px; color: var(--site-muted); font-size: 18px; }
.numerics-post .d-hero { display: none; }
.numerics-post .byline-grid { grid-template-columns: minmax(0,1fr) auto; gap: 4px 20px; border: 0; padding: 0; }
.numerics-post .byline-grid h3 { display: none; }
.numerics-post .byline-grid .cell { grid-row: auto !important; min-width: 0; font-size: 14px; }
.numerics-post .byline-grid .author { grid-column: 1; }
.numerics-post .byline-grid .affiliation { grid-column: 2; }
.numerics-post .byline-grid .pub { grid-column: 2; grid-row: 1 / span 2 !important; }
.numerics-post .d-byline a { color: var(--site-muted); }
.numerics-post .d-toc { margin: 26px auto 0; }
.numerics-post .d-toc .toc-box { padding-bottom: 18px; }
.numerics-post .d-toc h3 { display: none; }
.numerics-post .d-toc ol { columns: 2; gap: 24px; }
.numerics-post .d-toc li { font-size: 13px; margin-bottom: 8px; }
.numerics-post .d-toc li a { font-weight: 400; color: var(--site-muted) !important; }
.numerics-post .d-article { padding-top: 8px; padding-bottom: 28px; }
.numerics-post .d-article h2[id] { margin-top: 32px; padding-top: 0; border: 0; }
.numerics-post .d-article h2[id]::before { content: none; }
.numerics-post .d-article h3 { margin: 23px 0 9px; }
.numerics-post .d-article p { margin-bottom: 18px; }
.numerics-post .d-article .math-display { margin: 8px 0 16px; }
body.blog-page.numerics-post[data-theme="dark"] .d-article .math-display {
  background: transparent !important; border: 0 !important; box-shadow: none !important;
}
.numerics-post .katex { font-size: 1.02em; }
.numerics-post .katex-display {
  max-width: 100%; margin: 10px 0; padding: 3px 0;
  overflow-x: auto; overflow-y: hidden;
}
.numerics-post .d-article a { border: 0; }
.numerics-post .proof-details { margin: 0 0 20px; min-width: 0; }
.numerics-post .proof-details > summary { padding: 6px 0; color: var(--site-link); font-size: 15px; cursor: pointer; }
.numerics-post .proof-details > summary:focus-visible { outline: 2px solid var(--site-link); outline-offset: 4px; }
.numerics-post .proof-details[open] > summary { margin-bottom: 8px; }
.numerics-post .proof-details pre { font-size: 13px; background: #f7f8fa; color: #24292e; }
.numerics-post .proof-details pre[data-language="lean"] {
  line-height: 1.65; tab-size: 2; white-space: pre-wrap; overflow-wrap: anywhere;
}
/* Code colours, one palette for Lean and Julia. Lean roles come from the Lean server's
   hover for each name: tactics and commands, constants and types, local variables. */
.numerics-post .proof-details pre.code { color: #24292f; }
.numerics-post .proof-details :is(.lean-k,.lean-kd,.lean-kn,.lean-kp,.lean-kr) { color: #b42339; font-weight: 500; }
.numerics-post .proof-details .lean-tactic { color: #116a73; font-weight: 500; }
.numerics-post .proof-details :is(.lean-const,.lean-kt,.lean-nc,.lean-nf,.lean-nn,.lean-nl) { color: #0550ae; }
.numerics-post .proof-details .lean-var { color: #953800; }
.numerics-post .proof-details :is(.lean-m,.lean-mi,.lean-mf,.lean-mh,.lean-nb) { color: #6e40c9; }
.numerics-post .proof-details :is(.lean-op,.lean-o,.lean-bp,.lean-p) { color: #57606a; }
.numerics-post .proof-details :is(.lean-c,.lean-c1,.lean-cm,.lean-cs,.lean-sd) { color: #6a737d; font-style: italic; }
.numerics-post .proof-details :is(.lean-s,.lean-s1,.lean-s2) { color: #0a5d39; }
.numerics-post .proof-details pre.code { border-left: 3px solid #b8c7e0; }
.numerics-post .lean-eval-output .lean-tactic { color: #116a73; font-weight: 500; }
.numerics-post .lean-eval-output .lean-out-key { color: #6a737d; }
.numerics-post .proof-details pre[data-language="julia"] { border-left-color: #c9b3e6; }
.numerics-post .proof-details:has(> .lean-eval-output) > pre[data-language="lean"] { margin-bottom: 0; }
.numerics-post .proof-details .lean-eval-output {
  margin: 0 0 4px; padding: 8px 18px; border: 0; border-radius: 0;
  box-shadow: none; background: transparent; color: var(--site-ink);
  white-space: pre-wrap; overflow-wrap: anywhere; font: 13px/1.65 var(--font-mono);
}
.numerics-post .lean-eval-output::before {
  content: 'Lean output'; display: block; margin-bottom: 4px;
  color: var(--site-muted); font: 12px/1.5 var(--site-font);
}
.numerics-post .lean-eval-output samp { font: inherit; }
.numerics-post [data-lean-hover] { cursor: help; text-underline-offset: 3px; }
.numerics-post [data-lean-hover]:is(:hover,:focus-visible) {
  text-decoration: underline dotted; outline: 1px solid currentColor; outline-offset: 2px;
}
.numerics-post .lean-type-panel {
  position: fixed; z-index: 2000; width: min(560px, calc(100vw - 24px));
  max-height: min(420px, calc(100dvh - 24px)); overflow: auto;
  box-sizing: border-box; padding: 12px 14px;
  border: 1px solid var(--site-line); border-radius: 4px;
  background: var(--site-bg, #fff); color: var(--site-ink, #202124);
  box-shadow: 0 4px 18px #0002; font: 13px/1.6 var(--site-font);
}
.numerics-post .lean-type-panel[hidden] { display: none; }
.numerics-post .lean-type-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.numerics-post .lean-type-header strong { font-size: 12px; color: var(--site-muted); }
.numerics-post .lean-type-header button {
  width: 28px; height: 28px; padding: 0; border: 0; border-radius: 3px;
  background: transparent; color: inherit; font: 22px/1 var(--site-font); cursor: pointer;
}
.numerics-post .lean-type-header button:is(:hover,:focus-visible) { background: var(--site-hover); }
.numerics-post .lean-type-body :is(p,pre) { margin: 8px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.numerics-post .lean-type-body pre {
  padding: 0; border: 0; background: transparent; color: inherit;
  font: 12px/1.65 var(--font-mono); max-width: 100%;
}
.numerics-post .d-appendix { padding-top: 18px; border-color: var(--site-line); }
.numerics-post .d-appendix p { font-size: 15px; }
.numerics-post .citation { white-space: pre-wrap; overflow-wrap: anywhere; }

/* The figures keep their recorded data and light plotting palette in either theme. */
.numerics-post .d-article figure {
  min-width: 0; max-width: 100%; padding: 15px 0;
  margin: 10px 0 26px; border: 0; border-radius: 0;
  background: #fff; color: #202124;
  font-family: var(--site-font); font-size: 14px; line-height: 1.5;
}
.numerics-post .d-article figure :is(p,li) { font-size: inherit; line-height: inherit; }
body.blog-page.numerics-post[data-theme="dark"] .d-article figure :is(p,li,strong,b) { color: #202124 !important; }
.numerics-post .d-article figure figcaption {
  max-width: 100%; margin-top: 18px; padding: 14px 0 0;
  border-top: 1px solid #e5e7ea; background: #fff !important;
  color: #535861 !important; font-size: 14px; line-height: 1.65;
}
.numerics-post .figure-caption-title { display: block; color: #202124; font-size: 16px; margin-bottom: 5px; }
body.blog-page.numerics-post[data-theme="dark"] .d-article figure figcaption { color: #535861 !important; }
.numerics-post .figure-method { margin-top: 10px; font-size: 13px; line-height: 1.65; color: #535861; }
.numerics-post .figure-method summary { cursor: pointer; width: fit-content; }
.numerics-post .figure-method p { margin: 8px 0 0; }

/* Numbered displays: the formula centred, its number at the right margin. */
.numerics-post .equation {
  display: grid; grid-template-columns: 2.5rem minmax(0, 1fr) 2.5rem;
  align-items: center; column-gap: 0.35rem; margin: 10px 0 18px;
}
.numerics-post .equation-content { grid-column: 2; min-width: 0; }
.numerics-post .equation .katex-display { margin: 0; }
.numerics-post .equation-number {
  grid-column: 3; text-align: right; font-size: 15px;
  color: var(--site-muted); font-variant-numeric: tabular-nums;
}
.numerics-post .equation-number a { color: inherit; }
.numerics-post .equation .eq-mobile { display: none; }
@media (max-width: 600px) {
  .numerics-post .equation { grid-template-columns: minmax(0, 1fr) 2rem; column-gap: 0.25rem; }
  .numerics-post .equation-content { grid-column: 1; }
  .numerics-post .equation-number { grid-column: 2; }
  .numerics-post .equation:has(.eq-mobile) .eq-desktop { display: none; }
  .numerics-post .equation .eq-mobile { display: block; }
}
.numerics-post .d-article figure img { margin: 0 auto; }

/* The table of the three kinds of arithmetic. */
.numerics-post .arithmetic-kinds { margin: 4px 0 6px; }
.numerics-post .arithmetic-kinds th[scope="row"] { white-space: nowrap; color: var(--site-ink); }
.numerics-post .arithmetic-kinds :is(th,td) { padding: 9px 10px; }
.numerics-post :is(.cega-routes,.cega-modes) th[scope="row"] { color: var(--site-ink); }
.numerics-post :is(.cega-modes,.cega-routes) th[scope="row"] code { white-space: nowrap; }
.numerics-post :is(.cega-routes,.cega-modes) :is(th,td) { padding: 9px 10px; }
.numerics-post .d-appendix ol.references { padding-left: 1.4em; margin: 0 0 1em; font-size: 15px; }
.numerics-post .d-appendix ol.references li { margin: 0 0 0.6em; padding-left: 0.2em; }
.numerics-post .video-figure video { width: 100%; height: auto; display: block; border: 1px solid #e5e7ea; }
.numerics-post .live-embed { margin: -14px 0 26px; }
.numerics-post .live-embed iframe { display: block; width: 100%; height: 640px; border: 1px solid #e5e7ea; border-radius: 4px; background: #fff; }
.numerics-post .live-embed .live-open { margin: 8px 0 0; font-size: 14px; }

/* Contents in the left margin when there is room for it beside the 780px column. */
@media (min-width: 1320px) {
  .numerics-post .d-toc {
    position: fixed; top: 108px; left: max(20px, calc(50vw - 640px)); z-index: 5;
    display: block; width: 220px; margin: 0;
  }
  .numerics-post .d-toc .toc-box { border: 0; padding: 0; }
  .numerics-post .d-toc h3 {
    display: block; margin: 0 0 12px; font-size: 11px; font-weight: 600; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--site-muted);
  }
  .numerics-post .d-toc ol { columns: 1; }
  .numerics-post .d-toc li { margin: 0 0 10px; font-size: 13px; line-height: 1.35; }
  .numerics-post .d-toc li a:hover { color: var(--site-link) !important; }
}
