.doc-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--color-line);
  background:
    radial-gradient(circle at 50% 0, var(--color-accent-soft), transparent 42%),
    var(--color-canvas);
}

.doc-hero-inner {
  padding-top: clamp(48px, 8vw, 92px);
  padding-bottom: clamp(42px, 7vw, 78px);
  text-align: center;
}

.doc-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 30px;
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.doc-breadcrumb a {
  min-height: 24px;
  color: var(--color-accent-strong);
}

.doc-hero h1 {
  max-width: 920px;
  margin-inline: auto;
}

.doc-hero .lead {
  max-width: 780px;
  margin-inline: auto;
}

.doc-hero-facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  margin-top: 26px;
}

.doc-schematic {
  display: grid;
  grid-template-columns: auto minmax(70px, 220px) auto minmax(70px, 220px) auto;
  align-items: center;
  width: min(760px, 100%);
  margin: 42px auto 0;
  color: var(--color-accent);
}

.doc-schematic-source,
.doc-schematic-target {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  box-shadow: var(--shadow-card);
}

.doc-schematic-line {
  height: 1px;
  background:
    repeating-linear-gradient(
      to right,
      var(--color-ribbon),
      var(--color-ribbon) 5px,
      transparent 5px,
      transparent 10px
    );
}

.doc-schematic-knot {
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: var(--shadow-main);
}

.doc-schematic-knot svg {
  width: 46px;
  height: 46px;
}

.doc-schematic-knot path:first-child {
  color: var(--color-accent);
}

.doc-schematic-knot path:last-child {
  color: var(--color-accent-strong);
}

.doc-article {
  padding-top: clamp(38px, 6vw, 72px);
  padding-bottom: var(--section-space);
}

.doc-article .toc-tabs {
  max-width: var(--content-max);
  margin-right: auto;
  margin-left: auto;
}

.doc-section {
  padding-top: clamp(42px, 7vw, 76px);
  padding-bottom: clamp(42px, 7vw, 76px);
  border-bottom: 1px solid var(--color-line);
}

.doc-section:last-child {
  border-bottom: 0;
}

.doc-section > p {
  text-align: justify;
  text-justify: inter-ideograph;
}

.doc-section h2 {
  scroll-margin-top: calc(var(--header-height) + 82px);
}

.doc-section h3 {
  position: relative;
  padding-left: 18px;
}

.doc-section h3::before {
  position: absolute;
  top: .48em;
  bottom: .42em;
  left: 0;
  width: 4px;
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  content: "";
}

.doc-section .table-scroll {
  width: min(1040px, calc(100vw - (var(--gutter) * 2)));
  margin-top: 30px;
  margin-bottom: 30px;
  margin-left: 50%;
  transform: translateX(-50%);
}

.doc-section pre {
  margin-top: 24px;
  margin-bottom: 24px;
}

.doc-section a:not(.button) {
  font-weight: 650;
}

@media (max-width: 640px) {
  .doc-hero-inner {
    padding-top: 40px;
    padding-bottom: 46px;
  }

  .doc-breadcrumb {
    margin-bottom: 22px;
  }

  .doc-schematic {
    grid-template-columns: auto minmax(20px, 1fr) auto minmax(20px, 1fr) auto;
    margin-top: 32px;
  }

  .doc-schematic-source,
  .doc-schematic-target {
    padding-inline: 8px;
    font-size: 10px;
  }

  .doc-schematic-knot {
    width: 48px;
    height: 48px;
  }

  .doc-schematic-knot svg {
    width: 34px;
    height: 34px;
  }

  .doc-article {
    padding-top: 28px;
  }

  .doc-section {
    padding-top: 52px;
    padding-bottom: 52px;
  }

  .doc-section > p {
    text-align: left;
  }

  .doc-section .table-scroll {
    width: calc(100vw - (var(--gutter) * 2));
  }
}