/* ── Janus-MD Custom Styles ───────────────────────────────────────────────────
   Fork 后在此文件中添加任意自定义 CSS。
   此文件在 theme.css 之后加载，拥有最高优先级。

   适用场景:
   - 添加自定义组件样式
   - 覆盖特定选择器
   - 添加品牌独有的 UI 效果

   注意: 如果只需要改颜色/字体等全局变量，优先使用 theme.css。
   ────────────────────────────────────────────────────────────────────────── */
:root {
  --article-page-width: 80rem;
  --article-reading-width: 58rem;
}

/* Give article text and the desktop TOC their own wider canvas without
   changing the compact width used by index, category, and tag pages. */
.site-main:has(> article) {
  max-width: min(var(--article-page-width), 100%);
}

.article-layout:not(.has-toc) {
  max-width: var(--article-reading-width);
  margin-inline: auto;
}

/* Once the TOC becomes a drawer, return to a comfortable reading measure. */
@media (max-width: 1100px) {
  .site-main:has(> article) {
    max-width: min(var(--article-reading-width), 100%);
  }
}
