:root {
  color-scheme: light;
  font-family: "Courier New", Courier, monospace;
  color: #111;
  background: #fff;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #fff;
  color: #111;
  font-size: 17px;
  line-height: 1.65;
}

main {
  width: min(100% - 40px, 800px);
  margin: 0 auto;
  padding: 64px 0 80px;
}

header {
  padding-bottom: 36px;
  border-bottom: 1px solid #bbb;
}

.label {
  margin: 0 0 12px;
  color: #555;
  font-size: 14px;
}

h1,
h2,
h3 {
  line-height: 1.25;
}

h1 {
  max-width: 760px;
  margin: 0 0 24px;
  font-size: clamp(38px, 7vw, 58px);
  font-weight: 700;
  letter-spacing: -0.02em;
}

h2 {
  margin: 0 0 20px;
  font-size: 30px;
  font-weight: 700;
}

h3 {
  margin: 36px 0 12px;
  font-size: 20px;
}

p,
ul,
ol {
  margin-top: 0;
  margin-bottom: 20px;
}

section p,
section li {
  text-align: justify;
  text-align-last: left;
  text-justify: inter-word;
  hyphens: auto;
}

li + li {
  margin-top: 8px;
}

a {
  color: #0645ad;
  text-underline-offset: 2px;
}

a:hover {
  color: #0b0080;
}

.authors {
  margin-bottom: 12px;
  color: #333;
}

.links {
  margin: 0;
}

section,
nav {
  padding: 44px 0;
  border-bottom: 1px solid #ddd;
  scroll-margin-top: 20px;
}

nav ol {
  margin-bottom: 0;
}

code {
  font-family: inherit;
  font-size: 0.88em;
}

.equation {
  margin: 28px 0;
  overflow-x: auto;
  font-size: 21px;
}

.equation math {
  min-width: max-content;
  font-family: "STIX Two Math", "Cambria Math", serif;
}

.note {
  padding-left: 16px;
  border-left: 3px solid #aaa;
  color: #444;
  font-size: 15px;
}

figure {
  margin: 36px 0;
}

figure img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border: 1px solid #ddd;
}

.loop-figure img,
.speedup-figure img,
.transfer-figure img,
.tree-figure img {
  border: 0;
}

.transfer-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.transfer-panel-caption {
  margin-top: 6px;
  color: #555;
  font-size: 14px;
  text-align: center;
}

.pipeline-panels {
  display: grid;
  grid-template-columns: 2290fr 3304fr;
  align-items: start;
}

.pipeline-panels img {
  border: 0;
}

.pipeline-search-panel {
  display: block;
}

.pipeline-static {
  display: none;
}

figcaption,
caption {
  color: #555;
  font-size: 14px;
  text-align: center;
}

figcaption {
  margin-top: 8px;
}

table {
  width: 100%;
  margin: 32px 0;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.45;
}

caption {
  margin-bottom: 8px;
}

th,
td {
  padding: 9px 10px;
  border-top: 1px solid #ccc;
  text-align: left;
  vertical-align: top;
}

thead th {
  border-top: 2px solid #111;
  border-bottom: 1px solid #111;
}

tbody tr:last-child td {
  border-bottom: 2px solid #111;
}

.group-start td {
  border-top: 2px solid #777;
}

footer {
  padding-top: 44px;
  color: #444;
  font-size: 15px;
}

@media (max-width: 620px) {
  main {
    width: min(100% - 28px, 800px);
    padding-top: 36px;
  }

  body {
    font-size: 16px;
  }

  section,
  nav {
    padding: 36px 0;
  }

  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .pipeline-panels {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .transfer-panels {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pipeline-animation {
    display: none;
  }

  .pipeline-static {
    display: block;
  }
}

@media print {
  main {
    width: 100%;
    padding: 0;
  }

  a {
    color: #111;
  }
}
