.deepdoc-hero {
  position: relative;
  overflow: hidden;
  background: var(--color-canvas);
}

.deepdoc-hero::before,
.deepdoc-hero::after {
  position: absolute;
  z-index: 0;
  border-radius: var(--radius-brick);
  box-shadow: inset 0 0 0 1px var(--color-white-highlight);
  content: "";
  pointer-events: none;
}

.deepdoc-hero::before {
  width: clamp(150px, 20vw, 300px);
  aspect-ratio: 1;
  top: 24px;
  right: max(-90px, -5vw);
  background: var(--color-brick-cobalt);
  box-shadow: inset 0 0 0 1px var(--color-white-highlight), 0 0 40px var(--color-glow-cobalt);
  transform: rotate(8deg);
}

.deepdoc-hero::after {
  width: clamp(100px, 14vw, 210px);
  aspect-ratio: 1;
  bottom: 32px;
  left: max(-72px, -4vw);
  background: var(--color-brick-honey);
  box-shadow: inset 0 0 0 1px var(--color-white-highlight), 0 0 40px var(--color-glow-honey);
  transform: rotate(-7deg);
}

.deepdoc-hero .reading-wrap {
  position: relative;
  z-index: 1;
}

.deepdoc-lead {
  margin: 22px 0 0;
  color: var(--color-muted);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.8;
}

.deepdoc-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.deepdoc-note {
  margin-top: 46px;
  background: var(--color-panel);
}

.deepdoc-note p {
  margin: 8px 0 0;
  color: var(--color-muted);
}

.deepdoc-note a,
.deepdoc-section a {
  color: var(--color-accent-dark);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

.deepdoc-section {
  position: relative;
  width: 100%;
  max-width: var(--reading-width);
  margin-inline: auto;
  padding-top: clamp(62px, 8vw, 96px);
}

.deepdoc-section + .deepdoc-section {
  margin-top: clamp(28px, 5vw, 54px);
  border-top: 1px solid var(--color-line);
}

.chapter-mark {
  display: inline-flex;
  min-width: 52px;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  border-radius: var(--radius-pill);
  background: var(--color-accent-soft);
  color: var(--color-accent-dark);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
}

.deepdoc-section h2 {
  margin-bottom: 28px;
}

.deepdoc-section h3 {
  margin-top: 48px;
  margin-bottom: 16px;
  font-size: clamp(21px, 2.5vw, 27px);
}

.deepdoc-section p {
  margin-bottom: 22px;
  overflow-wrap: break-word;
}

.deepdoc-section pre {
  margin-top: 26px;
  margin-bottom: 30px;
}

.deepdoc-section .table-wrap {
  margin-top: 30px;
  margin-bottom: 34px;
  border: 1px solid var(--color-line);
}

.deepdoc-section table {
  min-width: 680px;
  margin: 0;
  background: var(--color-canvas);
}

.deepdoc-section caption {
  padding: 16px;
  background: var(--color-panel);
  color: var(--color-muted);
  font-weight: 700;
}

.deepdoc-section tbody tr:last-child td {
  border-bottom: 0;
}

.deepdoc-section .callout {
  margin-top: 34px;
  margin-bottom: 34px;
}

@media (max-width: 768px) {
  .deepdoc-hero::before {
    right: -110px;
    opacity: .56;
  }

  .deepdoc-hero::after {
    left: -80px;
    opacity: .5;
  }

  .deepdoc-section {
    padding-top: 58px;
  }

  .deepdoc-section h3 {
    margin-top: 38px;
  }
}

@media (max-width: 640px) {
  .deepdoc-links {
    width: 100%;
  }

  .deepdoc-links .button {
    width: 100%;
  }

  .deepdoc-note {
    margin-top: 36px;
  }

  .deepdoc-section table {
    min-width: 620px;
  }
}