/* ===== 信奥编程小栈 - OI-Wiki 风格主题 ===== */

/* ---------- 顶部导航标签 ---------- */
.md-tabs {
  background-color: var(--md-primary-fg-color);
  box-shadow: 0 0 0.2rem rgba(0,0,0,0.1), 0 0.2rem 0.4rem rgba(0,0,0,0.2);
}

.md-tabs__link {
  font-size: 0.7rem;
  font-weight: 500;
  opacity: 0.85;
}

.md-tabs__link--active,
.md-tabs__link:hover {
  opacity: 1;
}

/* ---------- 头部 ---------- */
.md-header {
  background-color: var(--md-primary-fg-color);
  box-shadow: 0 0 0.2rem rgba(0,0,0,0.1), 0 0.2rem 0.4rem rgba(0,0,0,0.15);
}

.md-header__title {
  font-size: 0.9rem;
  font-weight: 600;
}

/* ---------- 侧边栏 ---------- */
.md-nav--primary .md-nav__title {
  background-color: var(--md-primary-fg-color);
  color: var(--md-primary-bg-color);
  font-size: 0.75rem;
  font-weight: 600;
}

.md-nav--primary .md-nav__item--active > .md-nav__link {
  color: var(--md-typeset-a-color);
  font-weight: 600;
}

.md-nav__link {
  font-size: 0.72rem;
}

/* ---------- 主内容区 ---------- */
.md-content {
  padding-top: 0.4rem;
}

.md-content h1 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.6em;
  margin-top: 0;
  letter-spacing: -0.02em;
  line-height: 1.3;
  border-bottom: 1px solid var(--md-default-fg-color--lighter);
  padding-bottom: 0.3em;
}

.md-content h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-top: 1.4em;
  margin-bottom: 0.5em;
  letter-spacing: -0.01em;
  line-height: 1.4;
}

.md-content h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-top: 1.2em;
  margin-bottom: 0.4em;
}

.md-typeset {
  font-size: 0.8rem;
  line-height: 1.75;
}

.md-typeset p {
  margin: 0.5em 0;
}

.md-typeset a {
  word-break: break-word;
}

/* ---------- 代码块 ---------- */
.md-typeset code {
  font-size: 0.72rem;
  border-radius: 3px;
  padding: 0.1em 0.3em;
  background-color: var(--md-code-bg-color);
}

.md-typeset pre > code {
  font-size: 0.72rem;
  line-height: 1.6;
}

/* ---------- 表格 ---------- */
.md-typeset table:not([class]) {
  font-size: 0.75rem;
  border-radius: 4px;
  box-shadow: 0 0 0 1px var(--md-default-fg-color--lighter);
}

.md-typeset table:not([class]) th {
  background-color: var(--md-primary-fg-color);
  color: var(--md-primary-bg-color);
  font-weight: 600;
  font-size: 0.72rem;
  padding: 0.6em 0.8em;
}

.md-typeset table:not([class]) td {
  padding: 0.5em 0.8em;
}

/* ---------- 提示框/卡片 ---------- */
.md-typeset .admonition,
.md-typeset details {
  font-size: 0.78rem;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.md-typeset .admonition .admonition-title,
.md-typeset details > summary {
  font-size: 0.78rem;
  font-weight: 600;
}

/* ---------- 面包屑 ---------- */
.md-path {
  font-size: 0.65rem;
}

.md-path .md-path__item {
  display: inline-block;
}

/* ---------- 页脚 ---------- */
.md-footer-meta {
  background-color: var(--md-default-fg-color--lightest);
}

.md-footer-meta__inner {
  font-size: 0.7rem;
}

/* ---------- 搜索 ---------- */
.md-search__result {
  font-size: 0.75rem;
}

/* ---------- 按钮和交互元素 ---------- */
.md-typeset .md-button {
  font-size: 0.75rem;
  border-radius: 4px;
}

.md-typeset .md-button--primary {
  background-color: var(--md-primary-fg-color);
  border-color: var(--md-primary-fg-color);
  color: var(--md-primary-bg-color);
}

/* ---------- 列表样式 ---------- */
.md-typeset ul,
.md-typeset ol {
  margin: 0.4em 0;
}

.md-typeset li {
  margin-bottom: 0.2em;
}

/* ---------- 区块引用 ---------- */
.md-typeset blockquote {
  border-left: 3px solid var(--md-primary-fg-color);
  padding-left: 1em;
  color: var(--md-default-fg-color--light);
  font-size: 0.78rem;
}

/* ---------- 分割线 ---------- */
.md-typeset hr {
  margin: 1.5em 0;
}

/* ---------- 移动端适配 ---------- */
@media screen and (max-width: 76.1875em) {
  .md-content h1 {
    font-size: 1.5rem;
  }
  .md-content h2 {
    font-size: 1.2rem;
  }
  .md-content h3 {
    font-size: 1.05rem;
  }
  .md-typeset {
    font-size: 0.78rem;
  }
  .md-tabs__link {
    font-size: 0.65rem;
  }
}

/* ---------- 打印优化 ---------- */
@media print {
  .md-tabs, .md-header, .md-footer, .md-sidebar {
    display: none;
  }
  .md-content {
    margin: 0;
    padding: 0;
  }
}
