/* The methods paper page (/pulse/whitepaper): the paper on white, set as in its PDF
   (Palatino text and math, Helvetica headings, at the PDF's measure of about 90
   characters a line). The paper's HTML comes from LaTeXML through
   tool/build-whitepaper.sh and keeps LaTeXML's class names (ltx_*).
   Every font is served from this site; see tool/whitepaper/fonts.sh. */

/* ---- the paper's fonts: free equivalents of those in its PDF ---- */
@font-face {
  font-family: "TeX Gyre Pagella";
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/texgyrepagella-regular.woff2) format("woff2");
}
@font-face {
  font-family: "TeX Gyre Pagella";
  font-weight: 400;
  font-style: italic;
  font-display: swap;
  src: url(/assets/fonts/texgyrepagella-italic.woff2) format("woff2");
}
@font-face {
  font-family: "TeX Gyre Pagella";
  font-weight: 700;
  font-display: swap;
  src: url(/assets/fonts/texgyrepagella-bold.woff2) format("woff2");
}
@font-face {
  font-family: "TeX Gyre Pagella";
  font-weight: 700;
  font-style: italic;
  font-display: swap;
  src: url(/assets/fonts/texgyrepagella-bolditalic.woff2) format("woff2");
}
@font-face {
  font-family: "TeX Gyre Pagella Math";
  font-display: swap;
  src: url(/assets/fonts/texgyrepagella-math.woff2) format("woff2");
}
@font-face {
  font-family: "TeX Gyre Heros";
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/texgyreheros-regular.woff2) format("woff2");
}
@font-face {
  font-family: "TeX Gyre Heros";
  font-weight: 700;
  font-display: swap;
  src: url(/assets/fonts/texgyreheros-bold.woff2) format("woff2");
}
@font-face {
  font-family: "Latin Modern Mono";
  font-display: swap;
  src: url(/assets/fonts/lmmono10-regular.woff2) format("woff2");
}

:root {
  --wp-bar: 60px;
  --wp-serif: "TeX Gyre Pagella", "Palatino Linotype", Palatino, "Book Antiqua", serif;
  --wp-sans: "TeX Gyre Heros", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --wp-mono: "Latin Modern Mono", "Courier New", monospace;
  --wp-math: "TeX Gyre Pagella Math", math;
  --wp-nav: #193c78; /* the PDF's link colour, RGB 25, 60, 120 */
  --wp-grey: #666;
  --wp-rule: #999;
}
html {
  scroll-behavior: auto;
  scroll-padding-top: calc(var(--wp-bar) + 16px);
}
body {
  background: #fff;
}

/* ---- header: brand left; GitHub and the PDF right ---- */
.wp-top {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.wp-top .wrap {
  min-height: var(--wp-bar);
}
.wp-acts {
  display: flex;
  align-items: center;
  gap: 20px;
}
.wp-gh {
  font: 600 0.88rem/1 var(--font-body);
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 5px;
  text-decoration-thickness: 1.5px;
  padding: 8px 0;
}
.wp-gh:hover {
  text-decoration-color: var(--blue);
}
.wp-top .btn .arr {
  font-weight: 500;
}
.wp-top .btn:hover .arr {
  transform: translateY(2px);
}

.wp-doc {
  max-width: calc(38.64em + 2 * clamp(20px, 4vw, 40px));
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px) 72px;
  font-size: 17px;
}
.wp-k {
  padding: 22px 0 18px;
  border-bottom: 1px solid var(--line);
  margin: 0 0 2.4em;
}
.wp-k a {
  text-decoration: none;
}
.wp-k a:hover {
  color: var(--ink);
}

/* ---- the paper ---- */
.wp-paper {
  font: 400 1em/1.5 var(--wp-serif);
  color: #000;
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
  font-variant-ligatures: common-ligatures;
  overflow-wrap: break-word;
}
.wp-paper p {
  margin: 0;
}
.wp-paper a {
  color: var(--wp-nav);
  text-decoration: none;
}
.wp-paper a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.wp-paper math {
  font-family: var(--wp-math);
}
/* MathML Core has no columnalign or columnspacing: the cases of Eq. 10 as in TeX */
.wp-paper mtd[columnalign="left"] {
  text-align: left;
}
.wp-paper mtable[columnspacing] > mtr > mtd + mtd {
  padding-left: 1em;
}
.wp-paper mtable[rowspacing] > mtr > mtd {
  padding-top: 0.1em;
  padding-bottom: 0.1em;
}
.wp-paper mrow.wp-overline {
  border-top: 0.05em solid;
  padding-top: 0.08em;
}
/* <cite> is italic by default; the citation numbers are not. Superscripts and subscripts
   do not widen the line spacing. */
.wp-paper cite {
  font-style: normal;
}
.wp-nw {
  white-space: nowrap;
}
.wp-paper sup,
.wp-paper sub {
  line-height: 0;
}
.wp-paper hr.wp-rule {
  border: 0;
  border-top: 0.6pt solid var(--wp-rule);
  margin: 1em 0;
}
.ltx_font_sansserif {
  font-family: var(--wp-sans);
}
.ltx_font_typewriter {
  font-family: var(--wp-mono);
}
.ltx_font_bold {
  font-weight: 700;
}
.ltx_font_italic {
  font-style: italic;
}
.ltx_font_upright {
  font-style: normal;
}
[style*="--ltx-fg-color"] {
  color: var(--ltx-fg-color);
}
.ltx_align_left {
  text-align: left;
}
.ltx_align_right {
  text-align: right;
}
.ltx_align_center {
  text-align: center;
}
.ltx_align_justify {
  text-align: justify;
}
.ltx_align_top {
  vertical-align: top;
}
.ltx_align_middle {
  vertical-align: middle;
}

/* Title block, abstract, contents */
.wp-head {
  text-align: center;
  margin-bottom: 1.6em;
}
.wp-head h1 {
  font: 700 1.57em/1.25 var(--wp-sans);
  letter-spacing: 0;
  margin: 0 0 0.6em;
  text-align: center;
  hyphens: manual;
}
.wp-head p {
  text-align: center;
}
.wp-author {
  font-size: 1.09em;
}
.wp-date {
  color: var(--wp-grey);
}
.wp-paper h2.wp-label {
  font: 700 0.909em/1.4 var(--wp-sans);
  margin: 0 0 0.3em;
}
.wp-toc {
  font-size: 0.909em;
  text-align: left;
  hyphens: manual;
}
.wp-toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
}
.wp-toc > ol > li {
  margin-top: 0.15em;
}
.wp-toc > ol > li > a {
  font-family: var(--wp-sans);
  font-weight: 700;
}
.wp-toc ol ol {
  padding-left: 1.98em;
  font-size: 0.9em;
  line-height: 1.45;
}
.wp-toc ol ol li {
  display: inline;
}
.wp-toc ol ol li + li::before {
  content: " · ";
  color: var(--wp-grey);
}
.wp-toc .ltx_tag {
  margin-right: 0.4em;
}

/* Headings: parts, sections, subsections, run-in paragraphs */
.wp-paper h2,
.wp-paper h3,
.wp-paper h4 {
  font-family: var(--wp-sans);
  font-weight: 700;
  letter-spacing: 0;
  text-align: left;
  hyphens: manual;
}
.wp-paper section.ltx_section > h2,
.wp-paper section.ltx_bibliography > h2 {
  font-size: 1.31em;
  line-height: 1.3;
  margin: 1.9em 0 0.6em;
}
.wp-paper h2.wp-part {
  font-size: 1.57em;
  margin-top: 2.2em;
  padding-bottom: 0.45em;
  border-bottom: 0.6pt solid var(--wp-rule);
  margin-bottom: 0.9em;
}
.wp-paper h3 {
  font-size: 1.09em;
  line-height: 1.3;
  margin: 1.6em 0 0.45em;
}
.wp-paper h3.wp-big {
  font-size: 1.31em;
}
.wp-paper .ltx_title .ltx_tag {
  margin-right: 0.6em;
}
.wp-paper h4.ltx_runin {
  float: left;
  font-size: 1em;
  line-height: inherit;
  margin: 0 0.7em 0 0;
}
.wp-paper section.ltx_paragraph {
  margin-top: 0.7em;
  clear: left;
}

/* Paragraphs indented as in the PDF; a paragraph after a heading or a display is not */
.wp-paper .ltx_para + .ltx_para:not(.ltx_noindent) > .ltx_p:first-child {
  text-indent: 1.55em;
}
.wp-paper section.ltx_paragraph > h4 + .ltx_para > .ltx_p:first-child {
  text-indent: 0;
}

/* Lists, and the numbered rules (steps, Q1-Q10, T1-T6, ...) */
.wp-paper ul.ltx_itemize,
.wp-paper ol.ltx_enumerate {
  margin: 0.35em 0;
  padding: 0;
}
.wp-paper li.ltx_item {
  list-style: none;
  display: flex;
  gap: 0.6em;
  margin: 0.2em 0;
}
.wp-paper .ltx_tag_item {
  flex: none;
  min-width: 0.9em;
}
.wp-paper ol.ltx_enumerate .ltx_tag_item {
  min-width: 2.3em;
}
.wp-paper li.ltx_item > .ltx_para {
  flex: 1;
  min-width: 0;
}

/* Displayed equations: number on the right; wide ones scroll in their box */
.wp-eq {
  overflow-x: auto;
  margin: 0.55em 0;
}
.wp-eq table {
  width: 100%;
  border-collapse: collapse;
}
.wp-eq td {
  padding: 0;
  white-space: nowrap;
}
.ltx_eqn_center_padleft,
.ltx_eqn_center_padright {
  width: 50%;
}
.ltx_eqn_eqno {
  padding-left: 1em !important;
}

/* Tables: booktabs rules; widths in em of the paper's text, as in the PDF */
.wp-tab {
  overflow-x: auto;
  margin: 0.4em 0;
}
.wp-tab table {
  /* \textwidth, as every table of the paper: 425 pt at 11 pt */
  width: 38.64em;
  border-collapse: collapse;
  margin: 0 auto;
  /* the cells' text is 80 % (\footnotesize); \arraystretch 1.15 */
  line-height: 1.15;
  text-align: left;
  hyphens: manual;
}
.wp-tab td,
.wp-tab th {
  padding-left: 0.55em;
  padding-right: 0.55em;
  font-weight: 400;
  vertical-align: top;
}
/* the cells' text carries LaTeXML's 80 %; their reference numbers do not */
.wp-tab cite {
  font-size: 0.8em;
}
.wp-tab td:first-child,
.wp-tab th:first-child {
  padding-left: 0;
}
.wp-tab .ltx_nopad_r {
  padding-right: 0;
}
.wp-tab .ltx_inline-block {
  display: inline-block;
}
.wp-tab .ltx_p {
  display: block;
}
.ltx_border_tt {
  border-top: 1px solid #000;
}
.ltx_border_t {
  border-top: 0.6px solid #000;
}
.ltx_border_bb {
  border-bottom: 1px solid #000;
}
.ltx_border_b {
  border-bottom: 0.6px solid #000;
}

/* Figures and tables with their captions */
.wp-paper figure {
  margin: 1.4em 0;
}
.wp-paper figcaption {
  font-size: 0.909em;
  line-height: 1.45;
  margin: 0.5em 0;
}
.wp-paper figcaption .ltx_tag {
  font-weight: 700;
}
.wp-paper .ltx_figure_panel {
  line-height: 1.12;
  margin-top: 0.35em;
}
.wp-fig {
  position: relative;
  margin: 0 auto;
}
.wp-fig img {
  display: block;
  width: 100%;
  height: auto;
}
.wp-fig a {
  position: absolute;
  border-radius: 2px;
}
.wp-fig a:hover {
  background: rgba(25, 60, 120, 0.12);
}

/* References: [n] hanging, then the pages that cite it */
.wp-paper ul.ltx_biblist {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.955em;
}
.wp-paper li.ltx_bibitem {
  position: relative;
  padding-left: 2.6em;
  margin: 0 0 0.55em;
  text-align: left;
}
.wp-paper .ltx_tag_bibitem {
  position: absolute;
  left: 0;
  width: 2.1em;
  text-align: right;
}
.wp-paper .ltx_bibblock {
  display: inline;
}
.wp-backref {
  font: 0.818em var(--wp-sans);
  color: var(--wp-grey);
  margin-left: 0.5em;
}

@media (max-width: 700px) {
  .wp-doc {
    font-size: 16px;
  }
  .wp-paper {
    text-align: left;
  }
  .wp-head h1 br {
    display: none;
  }
}
@media (max-width: 600px) {
  :root {
    --wp-bar: 52px;
  }
  .wp-gh-long {
    display: none;
  }
  .wp-acts {
    gap: 12px;
  }
  .wp-top .wrap {
    flex-wrap: nowrap;
    gap: 12px;
  }
}
@media (max-width: 420px) {
  .wp-top .brand {
    font-size: 1rem;
    gap: 9px;
  }
  .wp-top .btn--sm {
    padding: 10px 12px;
  }
}
@media (max-width: 380px) {
  .wp-top .btn .arr {
    display: none;
  }
}
