:root {
  --canvas: #f5f5f4;
  --paper: #ffffff;
  --ink: #202124;
  --muted: #6f7378;
  --line: #e5e5e3;
  --line-strong: #c9cccf;
  --soft: #f1f1ef;
  --focus: #1a1c1f;
  font-family: Inter, "IBM Plex Sans", Arial, Helvetica, "Noto Sans SC", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 40px;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--canvas);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.72;
}

a {
  color: var(--ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--muted);
}

a:focus-visible,
[tabindex="-1"]:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 10px;
  left: 10px;
  padding: 8px 12px;
  color: var(--paper);
  background: var(--ink);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 11px;
  width: min(1500px, calc(100% - 48px));
  min-height: 54px;
  margin: 0 auto;
}

.site-mark {
  width: 18px;
  height: 18px;
  border: 5px solid var(--ink);
  border-right-color: var(--line-strong);
}

.site-label,
.repository-link,
.section-index__label {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
}

.site-label {
  color: var(--ink);
}

.repository-link {
  margin-left: auto;
  color: var(--muted);
  text-decoration: none;
}

.page-shell {
  display: grid;
  grid-template-columns: minmax(165px, 220px) minmax(0, 1040px);
  gap: clamp(36px, 6vw, 92px);
  align-items: start;
  width: min(1460px, calc(100% - 64px));
  margin: 0 auto;
  padding: 54px 0 96px;
}

.section-index {
  position: sticky;
  top: 32px;
  padding-top: 8px;
  border-top: 3px solid var(--ink);
}

.section-index__label {
  margin: 0 0 18px;
  color: var(--muted);
}

#section-index-links {
  display: grid;
  gap: 2px;
}

.section-link {
  display: block;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
  text-decoration: none;
}

.section-link:hover {
  color: var(--muted);
  border-bottom-color: var(--line-strong);
}

.section-link--nested {
  padding-left: 15px;
  color: var(--muted);
}

.report {
  min-width: 0;
  padding: 0 clamp(20px, 4vw, 68px) 72px;
  border-top: 5px solid var(--ink);
  background: var(--paper);
  box-shadow: 0 18px 55px rgba(32, 33, 36, 0.06);
}

.report > h1:first-child {
  max-width: 850px;
  margin: 0;
  padding: 46px 0 28px;
  color: var(--ink);
  font-size: 42px;
  font-weight: 760;
  line-height: 1.15;
}

.report h2 {
  margin: 76px 0 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line-strong);
  color: var(--ink);
  font-size: 26px;
  line-height: 1.25;
}

.report h3 {
  margin: 42px 0 16px;
  color: #303234;
  font-size: 19px;
  line-height: 1.3;
}

.report p,
.report li {
  max-width: 820px;
}

.report p {
  margin: 0 0 18px;
}

.report ul,
.report ol {
  margin: 0 0 24px;
  padding-left: 25px;
}

.report li + li {
  margin-top: 9px;
}

.report blockquote {
  position: relative;
  max-width: none;
  margin: 0 calc(-1 * clamp(20px, 4vw, 68px)) 50px;
  padding: 28px clamp(20px, 4vw, 68px) 30px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--soft);
  color: #45484b;
  font-size: 18px;
  line-height: 1.65;
}

.report blockquote::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 5px;
  background: var(--ink);
  content: "";
}

.report blockquote p {
  max-width: 900px;
  margin: 0;
}

.report strong {
  font-weight: 750;
}

.report code {
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--soft);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.88em;
}

.report img {
  display: block;
  width: 100%;
  height: auto;
  margin: 24px 0 44px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.report table {
  display: block;
  width: 100%;
  margin: 24px 0 36px;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 14px;
  white-space: nowrap;
}

.report th,
.report td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.report th {
  border-top: 2px solid var(--ink);
  border-bottom-color: var(--line-strong);
  background: var(--soft);
}

.result-table {
  width: fit-content;
  max-width: 100%;
  margin: 24px auto 36px;
  overflow-x: auto;
}

.result-table table {
  display: table;
  width: auto;
  min-width: 650px;
  margin: 0;
  overflow: visible;
}

.result-table th,
.result-table td {
  text-align: center;
}

.result-table th:first-child,
.result-table td:first-child {
  text-align: left;
}

.math-display {
  max-width: 100%;
  margin: 27px 0;
  overflow-x: auto;
  overflow-y: hidden;
}

.report mjx-container[jax="CHTML"][display="true"] {
  max-width: 100%;
  margin: 27px 0 !important;
  padding: 8px 0;
  overflow-x: auto;
  overflow-y: hidden;
  font-family: "STIX Two Math", "Cambria Math", "Times New Roman", serif;
}

@media (max-width: 1080px) {
  .page-shell {
    grid-template-columns: 1fr;
    gap: 28px;
    width: min(980px, calc(100% - 36px));
    padding-top: 28px;
  }

  .section-index {
    position: static;
  }

  #section-index-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0 18px;
  }

  .section-link {
    border-bottom: 0;
  }

  .section-link--nested {
    padding-left: 0;
  }
}

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

  .site-header__inner {
    width: calc(100% - 28px);
  }

  .site-label {
    max-width: 180px;
  }

  .repository-link {
    font-size: 11px;
  }

  .page-shell {
    width: 100%;
    padding: 18px 0 0;
  }

  .section-index {
    margin: 0 18px;
  }

  .report {
    padding: 0 18px 56px;
    box-shadow: none;
  }

  .report > h1:first-child {
    padding: 34px 0 22px;
    font-size: 32px;
  }

  .report h2 {
    margin-top: 58px;
    font-size: 23px;
  }

  .report blockquote {
    margin-right: -18px;
    margin-left: -18px;
    padding-right: 18px;
    padding-left: 22px;
    font-size: 16px;
  }

  .report img {
    width: calc(100% + 36px);
    max-width: none;
    margin-left: -18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
