@font-face {
  font-family: "EB Garamond";
  src: url("../assets/fonts/EBGaramond-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "EB Garamond";
  src: url("../assets/fonts/EBGaramond-latin-ext.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "EB Garamond";
  src: url("../assets/fonts/EBGaramond-italic-latin.woff2") format("woff2");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "EB Garamond";
  src: url("../assets/fonts/EBGaramond-italic-latin-ext.woff2") format("woff2");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --ink: #14140f;
  --soft: #55544d;
  --rule: #d6d3ca;
  --link: #14459c;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --diagram-edge: #74899b;
  --diagram-box: #aebdca;
  --diagram-node-fill: #f5f8fa;
  --diagram-strong-fill: #e7eff5;
  --diagram-strong-border: #617f98;
  --diagram-shadow-fill: #f7f2e7;
  --diagram-shadow-border: #b6a57e;
  --diagram-label: #536f86;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #fdfdfb;
  color: var(--ink);
  font-family: "EB Garamond", Garamond, "Times New Roman", serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--link);
  text-underline-offset: 0.15em;
}

.paper {
  max-width: 41rem;
  margin: 0 auto;
  padding: 40px 22px 90px;
}

.source {
  margin: 0 0 54px;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

.titlepage {
  margin-bottom: 52px;
  text-align: center;
}

h1 {
  margin: 0;
  font-size: 2.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.08;
}

.subtitle {
  max-width: 36ch;
  margin: 0.65em auto 0;
  color: var(--soft);
  font-size: 1.15rem;
  line-height: 1.4;
}

.titlepage .authors {
  margin: 1.5em 0 0;
}

.titlepage .authors a {
  font-size: 0.92rem;
}

.titlepage .note,
.no-results {
  margin: 1.5em 0 0;
  color: var(--soft);
  font-size: 0.88rem;
  font-style: italic;
}

h2 {
  margin: 3em 0 0.65em;
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

h3 {
  margin: 2.1em 0 0.45em;
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.3;
}

p,
dd {
  margin: 0 0 1em;
}

.abstract {
  margin-bottom: 2.6em;
  padding: 1.4em 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font-size: 0.95rem;
}

.abstract h2 {
  margin: 0 0 0.7em;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-align: center;
  text-transform: uppercase;
}

.contents {
  margin-bottom: 2.8em;
  font-size: 0.92rem;
}

.contents h2 {
  margin: 0 0 0.5em;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.contents ol {
  margin: 0;
  padding-left: 1.7em;
}

.contents li {
  margin-bottom: 0.15em;
}

ul,
ol {
  padding-left: 1.5em;
}

li {
  margin-bottom: 0.4em;
}

dt {
  font-weight: 600;
}

dd {
  margin-left: 0;
}

.principle {
  margin: 1.6em 0;
  text-align: center;
  font-style: italic;
}

figure {
  margin: 2.2em 0;
  padding: 1.1em 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.overview-figure {
  margin-top: 0;
  margin-bottom: 3.2em;
  padding-top: 0;
  border-top: 0;
}

figcaption {
  color: var(--soft);
  font-size: 0.85rem;
  line-height: 1.45;
}

.diagram-wrap {
  margin: 0 0 1.1em;
  overflow-x: auto;
}

.diagram {
  display: block;
  width: 100%;
  /* Below this the labels stop being legible, so the wrapper scrolls instead. */
  min-width: 470px;
  height: auto;
  color: var(--diagram-edge);
}

/* text-anchor stays a presentation attribute on each <svg>, so that per-element
   text-anchor attributes can still override it. A CSS rule here could not be. */
.diagram text {
  fill: var(--ink);
}

.d-node {
  fill: var(--diagram-node-fill);
  stroke: var(--diagram-box);
  stroke-width: 1;
}

.d-node-strong {
  fill: var(--diagram-strong-fill);
  stroke: var(--diagram-strong-border);
  stroke-width: 1.3;
}

.d-node-dash {
  fill: var(--diagram-shadow-fill);
  stroke: var(--diagram-shadow-border);
  stroke-width: 1;
  stroke-dasharray: 5 3;
}

.d-group {
  fill: #fbfbf8;
  stroke: var(--rule);
  stroke-width: 1;
}

.d-edge,
.d-edge-dash {
  fill: none;
  stroke: var(--diagram-edge);
  stroke-width: 1.1;
}

.d-edge-dash {
  stroke-dasharray: 5 4;
}

.d-rule {
  stroke: var(--rule);
  stroke-width: 1;
}

.d-t {
  font-size: 13px;
}

.d-t-strong {
  font-size: 13px;
  font-weight: 600;
}

.d-t-sm {
  font-size: 12px;
}

.d-a {
  font-size: 11px;
  fill: var(--soft);
}

.d-xs {
  font-size: 10px;
  fill: var(--soft);
}

.d-cap {
  font-size: 10px;
  fill: var(--diagram-label);
  font-weight: 600;
  letter-spacing: 0.1em;
}

.algorithm {
  margin: 2em 0;
  padding: 1em 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.algorithm figcaption {
  display: block;
  margin-bottom: 0.7em;
  color: var(--ink);
  font-weight: 600;
}

.algorithm p {
  margin: 0 0 0.6em;
  font-size: 0.86rem;
  font-style: italic;
}

.algorithm ol {
  margin: 0;
  font-size: 0.86rem;
}

.algorithm ol ol {
  margin-top: 0.35em;
  list-style-type: lower-alpha;
}

.algorithm li {
  margin-bottom: 0.25em;
}

code {
  font-family: var(--mono);
  font-size: 0.84em;
}

pre.schema {
  margin: 1.6em 0;
  padding: 1.1em 1.2em;
  overflow-x: auto;
  border: 1px solid var(--rule);
  background: #f5f4ef;
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.55;
}

.equation {
  margin: 1.7em 0;
  display: flex;
  align-items: baseline;
  gap: 1em;
  font-style: italic;
}

.equation span:first-child {
  flex: 1;
  text-align: center;
}

.equation .eqno {
  font-style: normal;
}

.table-wrap {
  margin: 2.2em 0;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

caption {
  padding-bottom: 0.7em;
  color: var(--soft);
  font-size: 0.85rem;
  text-align: left;
}

th,
td {
  padding: 0.5em 0.8em 0.5em 0;
  text-align: left;
  vertical-align: top;
}

th {
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  font-weight: 600;
}

tbody tr:last-child td {
  border-bottom: 1px solid var(--ink);
}

.references ol {
  font-size: 0.86rem;
}

.references li {
  scroll-margin-top: 1em;
}

.appendix {
  margin-top: 3.4em;
  padding-top: 1.6em;
  border-top: 1px solid var(--rule);
}

footer {
  margin-top: 4em;
  padding-top: 1.4em;
  border-top: 1px solid var(--rule);
  font-size: 0.88rem;
}

footer p {
  margin: 0 0 0.4em;
}

@media (max-width: 600px) {
  body {
    font-size: 15px;
  }

  .paper {
    padding: 28px 18px 70px;
  }

  h1 {
    font-size: 1.85rem;
  }

  .subtitle {
    max-width: 30ch;
    font-size: 1.05rem;
  }

  h2 {
    font-size: 1.3rem;
  }

  h3 {
    font-size: 1.05rem;
  }

  .source {
    margin-bottom: 38px;
  }
}

@media print {
  body {
    background: #fff;
    font-size: 10.5pt;
  }

  .paper {
    max-width: none;
    padding: 0;
  }

  .source {
    display: none;
  }

  a {
    color: #000;
    text-decoration: none;
  }

  figure,
  .table-wrap,
  pre.schema {
    break-inside: avoid;
  }

  .diagram {
    min-width: 0;
  }
}
