.deepdoc-hero{
  position:relative;
  padding-top:clamp(64px,8vw,108px);
  padding-bottom:clamp(58px,7vw,92px);
  overflow-x:clip;
  border-bottom:1px solid var(--color-border);
}

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

.deepdoc-hero-layout{
  position:relative;
  display:grid;
  grid-template-columns:minmax(0,.88fr) minmax(470px,1.12fr);
  align-items:center;
  gap:clamp(34px,6vw,78px);
}

.deepdoc-intro h1{
  max-width:650px;
  margin-top:18px;
  margin-bottom:24px;
  font-size:clamp(52px,5.4vw,70px);
}

.deepdoc-intro .lead{
  margin-bottom:24px;
}

.guide-relationship{
  max-width:670px;
  margin-bottom:24px;
  padding:18px 20px;
  border-left:3px solid var(--color-accent);
  border-radius:0 var(--radius-md) var(--radius-md) 0;
  background:var(--color-panel);
}

.guide-relationship p{
  margin-bottom:0;
}

.guide-relationship a{
  color:var(--color-accent);
  text-decoration:underline;
  text-underline-offset:3px;
}

.reference-map{
  position:relative;
  padding:clamp(22px,3vw,34px);
  overflow:hidden;
  border:1px solid var(--color-border);
  border-radius:var(--radius-xl);
  background:var(--color-panel);
  box-shadow:var(--shadow-deep),var(--shadow-inset);
}

.reference-map::after{
  position:absolute;
  right:-10%;
  bottom:-26%;
  width:58%;
  aspect-ratio:1;
  border-radius:var(--radius-pill);
  background:var(--color-accent-faint);
  filter:blur(30px);
  content:"";
  pointer-events:none;
}

.map-heading{
  position:relative;
  z-index:2;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  color:var(--color-text);
  font-weight:600;
}

.map-heading code{
  color:var(--color-muted);
  font-size:11px;
  letter-spacing:.08em;
}

.map-track{
  position:relative;
  z-index:2;
  min-height:320px;
  margin-top:20px;
  margin-bottom:20px;
  border:1px solid var(--color-border);
  border-radius:var(--radius-lg);
  background:linear-gradient(var(--color-highlight) 1px,transparent 1px),linear-gradient(90deg,var(--color-highlight) 1px,transparent 1px),var(--color-bg);
  background-size:34px 34px;
}

.map-track svg{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
}

.map-line{
  fill:none;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.map-line-muted{
  stroke:var(--color-border-strong);
  stroke-width:2;
}

.map-line-accent{
  stroke:var(--color-accent);
  stroke-width:3;
  filter:drop-shadow(0 0 7px var(--color-accent));
}

.map-node{
  fill:var(--color-panel-raised);
  stroke:var(--color-border-strong);
  stroke-width:3;
}

.map-node-accent{
  fill:var(--color-accent);
  stroke:var(--color-bg);
}

.map-label{
  position:absolute;
  z-index:3;
  padding:5px 9px;
  border:1px solid var(--color-border);
  border-radius:var(--radius-pill);
  background:var(--color-panel-raised);
  color:var(--color-muted);
  font-family:var(--font-mono);
  font-size:10px;
  white-space:nowrap;
}

.label-browser{
  top:12%;
  left:3%;
}

.label-terminal{
  bottom:12%;
  left:3%;
}

.label-route{
  top:45%;
  left:30%;
  color:var(--color-accent);
}

.label-account{
  top:18%;
  right:24%;
}

.label-api{
  right:24%;
  bottom:18%;
}

.label-stream{
  top:45%;
  right:2%;
  color:var(--color-accent);
}

.reference-map .fact-band{
  position:relative;
  z-index:2;
}

.deepdoc-layout{
  padding-top:48px;
  padding-bottom:var(--section-space);
}

.deepdoc-layout > .toc-tabs{
  top:10px;
}

.article-reading{
  max-width:920px;
  margin-inline:auto;
}

.doc-chapter{
  position:relative;
  padding-top:clamp(72px,8vw,108px);
  padding-bottom:clamp(72px,8vw,108px);
  border-bottom:1px solid var(--color-border);
}

.doc-chapter:first-child{
  padding-top:36px;
}

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

.doc-chapter::before{
  position:absolute;
  top:clamp(72px,8vw,108px);
  left:-38px;
  width:10px;
  height:10px;
  border:2px solid var(--color-accent);
  border-radius:var(--radius-pill);
  background:var(--color-bg);
  content:"";
}

.doc-chapter:first-child::before{
  top:36px;
}

.doc-chapter::after{
  position:absolute;
  top:0;
  bottom:0;
  left:-34px;
  width:1px;
  background:var(--color-border);
  content:"";
}

.chapter-index{
  margin-bottom:12px;
  color:var(--color-accent);
  font-family:var(--font-mono);
  font-size:11px;
  font-weight:700;
  letter-spacing:.16em;
}

.doc-chapter h2{
  max-width:780px;
  margin-top:0;
  margin-bottom:38px;
}

.doc-chapter h3{
  margin-top:48px;
  margin-bottom:16px;
  padding-left:16px;
  border-left:3px solid var(--color-border-strong);
  font-size:clamp(21px,2.4vw,28px);
}

.doc-chapter p{
  font-size:16px;
  line-height:1.9;
}

.doc-chapter .table-scroll{
  margin-top:34px;
  margin-bottom:38px;
}

.doc-chapter pre{
  margin-top:26px;
  margin-bottom:30px;
  line-height:1.75;
}

.doc-chapter .callout{
  margin-top:38px;
  margin-bottom:38px;
}

@media(max-width:1000px){
  .deepdoc-hero-layout{
    grid-template-columns:1fr;
  }

  .reference-map{
    max-width:760px;
    width:100%;
  }
}

@media(max-width:768px){
  .deepdoc-hero{
    padding-top:54px;
  }

  .deepdoc-intro h1{
    font-size:clamp(28px,9vw,40px);
  }

  .reference-map{
    padding:16px;
    border-radius:var(--radius-lg);
  }

  .map-track{
    min-height:280px;
  }

  .map-label{
    font-size:9px;
  }

  .label-account,
  .label-api{
    right:19%;
  }

  .deepdoc-layout{
    padding-top:30px;
  }

  .article-reading{
    padding-left:18px;
  }

  .doc-chapter::before{
    left:-16px;
  }

  .doc-chapter::after{
    left:-12px;
  }

  .doc-chapter p{
    font-size:15px;
    line-height:1.82;
  }
}

@media(max-width:560px){
  .map-heading code{
    display:none;
  }

  .map-track{
    min-height:230px;
    background-size:28px 28px;
  }

  .label-browser,
  .label-terminal{
    left:2%;
  }

  .label-route{
    left:26%;
  }

  .label-account,
  .label-api{
    right:17%;
  }

  .label-stream{
    right:1%;
  }

  .deepdoc-layout > .toc-tabs{
    margin-bottom:18px;
  }

  .doc-chapter{
    padding-top:68px;
    padding-bottom:68px;
  }

  .doc-chapter h2{
    margin-bottom:30px;
  }

  .doc-chapter h3{
    margin-top:40px;
  }
}

@media(prefers-reduced-motion:reduce){
  .map-line-accent{
    filter:none;
  }
}