/* layout.css｜页面骨架布局
职责：旧兼容导航top‑nav‑bar、toc‑wrapper、md阅读器容器 #markdownContent
*/

/* ========== 原有layout.css骨架：旧版兼容导航 ========== */
.top-nav-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 30;
}
.top-nav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 100px;
  background-color: #3a2610;
  box-shadow: 0 2px 4px rgba(0,0,0,0.25);
}

/* ========== 阅读器悬浮目录toc ========== */
.toc-wrapper {
  position: fixed;
  top: 130px;
  left: 12px;
  z-index: 900;
}
.toc-toggle {
}
.toc {
  display: none;
  background: #222;
  border: 1px solid #444;
  padding: 8px;
  border-radius: 6px;
  max-height: 70vh;
  overflow-y: auto;
  color: #fff;
}
.toc.open {
  display: block;
}
.toc .toc-title {
  font-weight: bold;
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid #444;
}

.md-main-wrap {
  margin-top: 100px;
  height: calc(100% - 100px);
  overflow-y: auto;
  scroll-padding-top: 110px;
}
#markdownContent [id] {
  scroll-margin-top: 110px;
}
#markdownContent {
  max-width: 960px;
  margin: 0 auto;
  width: 100%;
  padding: 0 20px;
  background-color: #37383a;
  color: #eeeeee;
  border-radius: 6px;
}

@media (max-width: 1024px) {
  .top-nav-inner {
    padding: 0 12px;
  }
  #markdownContent {
    padding-left: 12px;
    padding-right: 12px;
  }
}
