/* NovaLabel 用户使用说明书 —— 网页版样式 */
:root {
  --md-primary-fg-color:        #1e408c;
  --md-primary-fg-color--light: #2e66d6;
  --md-primary-fg-color--dark:  #16306a;
  --md-accent-fg-color:         #e8542a;
  --nl-heading:                 #16306a;
  --nl-border:                  rgba(30, 64, 140, .14);
}

[data-md-color-scheme="slate"] {
  --md-primary-fg-color:        #4a7ae0;
  --md-primary-fg-color--light: #6c93ea;
  --md-primary-fg-color--dark:  #2c56b0;
  --nl-heading:                 #9dbcff;
  --nl-border:                  rgba(157, 188, 255, .18);
}

/* ---------- 版心与字号 ---------- */
.md-grid { max-width: 78rem; }
.md-typeset { font-size: .78rem; line-height: 1.75; }
.md-typeset p, .md-typeset li { text-align: justify; text-justify: inter-ideograph; }

/* ---------- 标题 ---------- */
.md-typeset h1 {
  font-weight: 700; margin-bottom: .8rem; padding-bottom: .45rem;
  border-bottom: 2px solid var(--md-primary-fg-color);
  color: var(--nl-heading);
}
[data-md-color-scheme="slate"] .md-typeset h1 { color: rgba(255,255,255,.92); }
.md-typeset h2 {
  font-weight: 700; margin-top: 2.2rem; padding-left: .55rem;
  border-left: 4px solid var(--md-primary-fg-color);
  color: var(--nl-heading);
}
.md-typeset h3 { font-weight: 700; margin-top: 1.6rem; color: var(--nl-heading); }

/* ---------- 表格 ---------- */
/* Material 默认把表格设为 inline-block + 横向滚动，这里改为整幅宽度 */
.md-typeset__table {
  display: block;
  width: 100%;
  overflow-x: auto;
}
.md-typeset table:not([class]) {
  display: table;
  width: 100%;
  font-size: .72rem;
  border: 1px solid var(--nl-border);
  border-radius: 6px;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  box-shadow: none;
}
.md-typeset table:not([class]) th {
  background-color: var(--md-primary-fg-color); color: #fff;
  font-weight: 600; padding: .5em .7em; border: none; white-space: nowrap;
}
.md-typeset table:not([class]) td {
  padding: .48em .7em; border-top: 1px solid var(--nl-border); vertical-align: top;
}
/* 空单元格（Word 里常留空）不要塌成一条缝 */
.md-typeset table:not([class]) td:empty::after { content: "\00a0"; }
.md-typeset table:not([class]) tbody tr:nth-child(even) { background-color: rgba(30,64,140,.035); }
[data-md-color-scheme="slate"] .md-typeset table:not([class]) tbody tr:nth-child(even) { background-color: rgba(157,188,255,.05); }
.md-typeset table:not([class]) tbody tr:hover { background-color: rgba(30,64,140,.07); }

/* ---------- 图 ---------- */
.md-typeset figure { margin: 1.4rem auto 1.6rem; text-align: center; }
.md-typeset figure img {
  border: 1px solid var(--nl-border); border-radius: 6px;
  box-shadow: 0 2px 10px rgba(22,48,106,.08);
  max-height: 30rem; width: auto; max-width: 100%;
}
.md-typeset figcaption {
  margin-top: .5rem; font-size: .68rem;
  color: var(--md-default-fg-color--light); line-height: 1.6;
}

/* ---------- 提示框 ---------- */
.md-typeset .admonition, .md-typeset details {
  font-size: .72rem; border-radius: 6px; box-shadow: none; border-width: 0 0 0 4px;
}
.md-typeset .admonition-title { font-weight: 700; }

/* ---------- 搜索结果：只保留页名与章节标题 ----------
   全文摘要会把表格数据挤成一段无标点的文字，反而看不清；
   命中标题已足够定位，点进去即可看到原文。 */
/* 摘要里的表格文字没有标点，挤成一团；只显示命中的章节标题 */
.md-search-result__article { font-size: 0 !important; }
.md-search-result__article > *:not(h1):not(h2) { display: none !important; }
.md-search-result__article > h1,
.md-search-result__article > h2 { font-size: .78rem !important; margin: .35em 0; }

/* ---------- 导航 ---------- */
/* 桌面端侧栏顶部的站点名与顶部栏重复，隐藏；移动端抽屉里保留 */
@media screen and (min-width: 76.25em) {
  .md-sidebar--primary .md-nav--primary > .md-nav__title { display: none; }
}
.md-nav__title { font-weight: 700; }
.md-nav--primary .md-nav__item--section > .md-nav__link { font-weight: 600; }

/* ---------- 首页 ---------- */
.nl-hero {
  margin: 1.2rem 0 2rem; padding: 2.2rem 1.8rem; border-radius: 12px;
  background: linear-gradient(135deg, #1e408c 0%, #2e66d6 60%, #3f7be0 100%);
  color: #fff;
}
.nl-hero h1 { margin: 0 0 .4rem; padding: 0; border: none; color: #fff; font-size: 1.6rem; }
.nl-hero p { margin: 0; opacity: .92; font-size: .78rem; }
.nl-cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: .9rem; margin: 1.2rem 0 1.8rem;
}
.nl-card {
  display: block; padding: .9rem 1rem; border: 1px solid var(--nl-border);
  border-radius: 8px; text-decoration: none; color: inherit;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.nl-card:hover {
  border-color: var(--md-primary-fg-color);
  box-shadow: 0 4px 14px rgba(22,48,106,.12); transform: translateY(-1px);
}
.nl-card b { display: block; font-size: .76rem; color: var(--nl-heading); margin-bottom: .15rem; }
.nl-card span { font-size: .68rem; color: var(--md-default-fg-color--light); line-height: 1.5; }
.nl-flow { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 1rem 0 1.6rem; }
.nl-flow span {
  padding: .3rem .7rem; border-radius: 999px;
  background: rgba(30,64,140,.08); border: 1px solid var(--nl-border); font-size: .7rem;
}
.nl-flow i { color: var(--md-default-fg-color--light); font-style: normal; }

/* ---------- 打印 / 导出 PDF ---------- */
@media print {
  .md-header, .md-tabs, .md-sidebar, .md-footer, .md-top, .md-search { display: none !important; }
  .md-content { max-width: none; }
  .md-typeset { font-size: 10pt; }
  .md-typeset h2 { break-after: avoid; }
  .md-typeset figure { break-inside: avoid; }
  .md-typeset table:not([class]) { break-inside: avoid; }
}
