/**
 * 主内容框居中（侧栏两态）
 *
 * 尺子：侧栏右缘→内容左缘  ==  内容右缘→视口右缘
 * （不算导航栏自身宽度；展开侧栏只变「剩余宽」，内容自动重算居中。）
 *
 * main 用 flex + align-items:center；子级 width:内容上限 + max-width:100%，
 * 比单独靠 margin:auto 更稳。
 */
:root {
  --mytheme-content-max: 1320px;
}

.mytheme-page-main {
  /* WHY：日报软切走后，左栏 overflow 层可能还画在主栏底下，缝里会透出时间轴文字 */
  background-color: #fff;
  isolation: isolate;
}

.mytheme-page-main > main {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  min-width: 0;
  position: relative;
  z-index: 1;
  background-color: #fff;
}

.mytheme-page-main .container-main,
.mytheme-page-main .mytheme-content-frame {
  width: var(--mytheme-content-max);
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  box-sizing: border-box;
}

/*
 * 导航（工具 / 资源 / Skill / 合集）顶部分类条跟左侧 Logo 中线对齐。
 * Logo：侧栏 pt-8（32px）+ 图高 32px，中线在 48px。
 * 分类条原先：内容区 py-8（32px）+ pt-4（16px）+ 42px 行里胶囊居中，中线在 69px。
 * 桌面去掉这 16px，再上移 5px，中线落到 48px。手机没有并排 Logo，保持原样。
 */
@media (min-width: 768px) {
  #mount-toolbox-grid > .pt-4,
  #mount-toolbox-grid > div > .pt-4,
  #mount-toolbox-collection-grid > .pt-4,
  #mount-toolbox-collection-grid > div > .pt-4 {
    padding-top: 0;
    margin-top: -5px;
  }
}

/* 日报白卡片铺满外层 container-main，不再自己再限窄 */
.mytheme-page-main .daily-archive-card,
.mytheme-page-main article.card.max-w-6xl {
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

/*
 * 正文表格（文章页即时生效，不走 Vite 构建）。
 * 合集 / 知识库同款：圆角外框 + 浅灰表头 + 横竖都画线。
 */
.entry-content table {
  width: 100%;
  margin: 1.25em 0;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #dedede;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.entry-content thead,
.entry-content th {
  background: #f5f5f5;
}

.entry-content th,
.entry-content td {
  color: #222222;
  text-align: left;
  vertical-align: top;
  padding: 12px 16px;
  border-right: 1px solid #dedede;
  border-bottom: 1px solid #dedede;
}

.entry-content th {
  font-weight: 600;
}

.entry-content td {
  background: #fff;
  font-weight: 400;
}

.entry-content th:last-child,
.entry-content td:last-child {
  border-right: none;
}

.entry-content tr:last-child th,
.entry-content tr:last-child td {
  border-bottom: none;
}

.entry-content table p {
  margin: 0;
}
