.doc-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-panel);
}

.doc-hero::before {
  position: absolute;
  top: -28%;
  right: -8%;
  width: 52%;
  aspect-ratio: 1;
  border-radius: var(--radius-pill);
  background: radial-gradient(circle, var(--color-accent-soft), transparent 68%);
  content: "";
  pointer-events: none;
}

.doc-hero::after {
  position: absolute;
  inset: auto 0 0;
  height: 44%;
  background-image:
    linear-gradient(var(--color-border) 1px, transparent 1px),
    linear-gradient(90deg, var(--color-border) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: .34;
  content: "";
  pointer-events: none;
}

.doc-hero-inner {
  position: relative;
  z-index: 1;
  padding-top: 82px;
  padding-bottom: 72px;
}

.doc-eyebrow {
  margin: 24px 0 12px;
  color: var(--color-accent-dark);
  font: 700 12px/1.4 var(--font-mono);
  letter-spacing: .1em;
}

.doc-hero h1 {
  max-width: 760px;
  margin-bottom: 22px;
}

.doc-summary {
  max-width: 740px;
  margin-bottom: 0;
  color: var(--color-muted);
  font-size: 19px;
  line-height: 1.75;
}

.doc-fact-row {
  display: flex;
  max-width: 820px;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.doc-fact-row span {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  color: var(--color-muted);
  font: 12px/1.4 var(--font-mono);
  box-shadow: var(--shadow-low);
}

.doc-fact-row b {
  color: var(--color-text);
}

.doc-hero .button-row {
  margin-top: 28px;
}

.doc-reading {
  position: relative;
  padding-bottom: 40px;
}

.doc-reading .toc-tabs {
  margin-inline: calc(var(--gutter) * -1);
  padding-inline: var(--gutter);
}

.doc-intro {
  padding-top: 48px;
  padding-bottom: 18px;
  color: var(--color-muted);
  font-size: 17px;
}

.doc-section {
  padding-top: 34px;
  padding-bottom: 26px;
  border-top: 1px solid var(--color-border);
}

.doc-section:first-of-type {
  border-top: 0;
}

.doc-section h2 {
  margin-top: 0;
}

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

.doc-section h3::before {
  position: absolute;
  top: .45em;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-accent);
  content: "";
}

.doc-section p + h3,
.doc-section .table-scroll + h3,
.doc-section pre + h3,
.doc-section .ticket-sheet + h3,
.doc-section .callout + h3 {
  margin-top: 38px;
}

.doc-section .table-scroll {
  margin-block: 26px 32px;
}

.doc-section pre {
  margin-block: 22px 26px;
}

.ticket-sheet {
  margin-block: 26px 30px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  box-shadow: var(--shadow-low);
}

.ticket-sheet dl {
  margin: 0;
}

.ticket-sheet dl > div {
  display: grid;
  grid-template-columns: minmax(120px, .3fr) minmax(0, 1fr);
  gap: 20px;
  padding: 18px 20px;
}

.ticket-sheet dl > div + div {
  border-top: 1px solid var(--color-border);
}

.ticket-sheet dt {
  font-family: var(--font-display);
  font-weight: 750;
}

.ticket-sheet dd {
  min-width: 0;
  margin: 0;
  color: var(--color-muted);
}

.doc-section .promo-block {
  max-width: none;
}

.doc-section .promo-block h2 {
  margin-bottom: 10px;
  font-size: clamp(28px, 4vw, 38px);
}

@media (max-width: 768px) {
  .doc-hero::before {
    top: -8%;
    right: -32%;
    width: 88%;
  }

  .doc-hero-inner {
    padding-top: 58px;
    padding-bottom: 54px;
  }

  .doc-summary {
    font-size: 16px;
  }

  .doc-reading .toc-tabs {
    margin-inline: calc(var(--gutter) * -1);
  }

  .doc-intro {
    padding-top: 38px;
    font-size: 16px;
  }

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

  .ticket-sheet dl > div {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 16px;
  }
}

@media (max-width: 640px) {
  .doc-fact-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .doc-fact-row span {
    min-width: 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .doc-section h3 {
    padding-left: 15px;
  }

  .doc-section h3::before {
    width: 6px;
    height: 6px;
  }
}