:root {
  --deepdoc-hero-gap: 54px;
  --deepdoc-hero-min-height: 610px;
  --deepdoc-copy-width: 590px;
  --deepdoc-visual-width: 530px;
  --deepdoc-sheet-height: 390px;
  --deepdoc-sheet-padding: 34px;
  --deepdoc-route-gap: 18px;
  --deepdoc-route-height: 48px;
  --deepdoc-stamp-size: 112px;
  --deepdoc-intro-width: 920px;
  --deepdoc-reading-width: 920px;
  --deepdoc-section-gap: 104px;
  --deepdoc-toc-top: 10px;
  --deepdoc-toc-margin: 48px;
  --deepdoc-check-padding: 28px;
  --deepdoc-path-width: 2px;
}

.deepdoc-hero {
  position: relative;
  overflow-x: clip;
  border-bottom: 1px solid var(--color-border);
}

.deepdoc-hero::before {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 36%, var(--color-shadow-accent), var(--color-transparent) 38%),
    linear-gradient(var(--color-transparent), var(--color-transparent));
  content: "";
  opacity: 0.42;
  pointer-events: none;
}

.deepdoc-hero-inner {
  position: relative;
  display: grid;
  min-height: var(--deepdoc-hero-min-height);
  grid-template-columns: minmax(0, 1fr) minmax(360px, var(--deepdoc-visual-width));
  align-items: center;
  gap: var(--deepdoc-hero-gap);
  padding-top: 72px;
  padding-bottom: 72px;
}

.deepdoc-hero-copy {
  min-width: 0;
  max-width: var(--deepdoc-copy-width);
}

.deepdoc-hero-copy h1 {
  margin-bottom: 24px;
}

.deepdoc-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.route-notebook {
  position: relative;
  min-width: 0;
}

.route-notebook::before {
  position: absolute;
  right: -18px;
  bottom: -24px;
  width: 72%;
  height: 88%;
  border-radius: var(--radius-md);
  background: var(--color-panel-alt);
  box-shadow: var(--shadow-raised);
  content: "";
  transform: rotate(-4deg);
}

.route-notebook-sheet {
  position: relative;
  min-height: var(--deepdoc-sheet-height);
  overflow: hidden;
  border: 9px solid var(--color-transparent);
  border-image: repeating-linear-gradient(
    45deg,
    var(--color-accent) 0 12px,
    var(--color-panel) 12px 24px
  ) 9;
  border-radius: var(--radius-md);
  background: var(--color-panel);
  padding: var(--deepdoc-sheet-padding);
  box-shadow: var(--shadow-raised);
  transform: rotate(2deg);
}

.route-notebook-label {
  margin-bottom: 26px;
  color: var(--color-accent);
  font: 750 11px var(--font-mono);
  letter-spacing: 0.18em;
}

.route-layer {
  position: relative;
  z-index: 2;
  display: grid;
  min-height: var(--deepdoc-route-height);
  grid-template-columns: minmax(58px, auto) minmax(40px, 1fr) minmax(90px, auto);
  align-items: center;
  gap: var(--deepdoc-route-gap);
  border-bottom: 1px dashed var(--color-border);
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 750;
}

.route-layer i {
  height: var(--deepdoc-path-width);
  background: var(--color-accent);
  opacity: 0.42;
}

.route-layer span:last-child {
  color: var(--color-text);
  text-align: right;
}

.route-notebook-path {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: auto;
  opacity: 0.18;
}

.route-notebook-path path {
  fill: none;
  stroke: var(--color-accent);
  stroke-width: var(--deepdoc-path-width);
  stroke-dasharray: 4 10;
}

.route-notebook-path circle {
  fill: var(--color-accent);
}

.route-notebook-stamp {
  position: absolute;
  z-index: 3;
  right: 24px;
  bottom: 22px;
  display: grid;
  width: var(--deepdoc-stamp-size);
  height: var(--deepdoc-stamp-size);
  place-content: center;
  border: 3px double var(--color-accent);
  border-radius: var(--radius-pill);
  color: var(--color-accent);
  text-align: center;
  transform: rotate(-9deg);
}

.route-notebook-stamp strong {
  font-size: 15px;
  letter-spacing: 0.1em;
}

.route-notebook-stamp small {
  display: block;
  margin-top: 5px;
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.04em;
}

.deepdoc-article {
  position: relative;
  padding-top: 78px;
  padding-bottom: var(--section-space);
}

.deepdoc-intro {
  max-width: var(--deepdoc-intro-width);
  margin-inline: auto;
  font-size: 17px;
}

.deepdoc-toc {
  top: var(--deepdoc-toc-top);
  margin-top: var(--deepdoc-toc-margin);
  margin-bottom: var(--deepdoc-toc-margin);
}

.deepdoc-reading {
  max-width: var(--deepdoc-reading-width);
  margin-inline: auto;
}

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

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

.deepdoc-section h2 {
  max-width: 800px;
}

.deepdoc-section h3 {
  margin-top: 1.8em;
}

.deepdoc-section p {
  line-height: 1.88;
}

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

.selection-checklist {
  margin: 34px 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-panel);
  padding: var(--deepdoc-check-padding);
  box-shadow: var(--shadow-card);
}

.selection-checklist h3 {
  margin-top: 0;
}

.selection-checklist ul {
  margin-bottom: 0;
}

.selection-checklist li::marker {
  color: var(--color-accent);
}

@media (max-width: 1050px) {
  .deepdoc-hero-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .deepdoc-hero-copy {
    max-width: 720px;
  }

  .route-notebook {
    max-width: var(--deepdoc-visual-width);
  }
}

@media (max-width: 768px) {
  :root {
    --deepdoc-hero-gap: 40px;
    --deepdoc-hero-min-height: auto;
    --deepdoc-sheet-height: 310px;
    --deepdoc-sheet-padding: 22px;
    --deepdoc-section-gap: 76px;
    --deepdoc-toc-margin: 34px;
  }

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

  .route-notebook-sheet {
    border-width: 7px;
    transform: none;
  }

  .route-notebook::before {
    display: none;
  }

  .route-notebook-label,
  .route-notebook-stamp {
    display: none;
  }

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

  .deepdoc-intro {
    font-size: 16px;
  }

  .deepdoc-toc {
    width: 100%;
  }

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

@media (max-width: 520px) {
  :root {
    --deepdoc-sheet-height: 270px;
    --deepdoc-route-gap: 10px;
    --deepdoc-check-padding: 22px;
  }

  .deepdoc-badges {
    align-items: flex-start;
    flex-direction: column;
  }

  .route-layer {
    grid-template-columns: minmax(48px, auto) minmax(20px, 1fr) minmax(78px, auto);
    font-size: 12px;
  }

  .route-notebook-path {
    display: none;
  }
}