/* =============================================================================
   校园资料检索与办事指引系统 · 唯一 CSS（移动优先，无外部字体、无 CDN）
   令牌严格按 ARCHITECTURE §11.6；类名用 BEM-lite。
   三态（在岗/外出/不办公）一律"文字 + 图标 + 底色"三重编码，灰度打印也能区分。
   ============================================================================= */

/* ---------- 设计令牌 ---------- */
:root {
  /* 颜色 */
  --c-primary: #1a6fc4;
  --c-primary-dark: #14538f;
  --c-on: #137a3f;
  --c-on-bg: #e6f5ec;
  --c-away: #a35b00;
  --c-away-bg: #fff4e0;
  --c-off: #8a1f1f;
  --c-off-bg: #fdeaea;
  --c-text: #1a1a1a;
  --c-muted: #6b6b6b;
  --c-line: #e2e2e2;
  --c-bg: #fbfbfb;
  /* 间距（8 的倍数） */
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  /* 字号 */
  --fs-xs: 12px;
  --fs-sm: 14px;
  --fs-md: 16px;
  --fs-lg: 20px;
  --fs-xl: 26px;
  /* 其他 */
  --radius: 8px;
  --tap: 44px;
  --maxw: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "Microsoft YaHei", "PingFang SC",
    "Hiragino Sans GB", "Source Han Sans SC", sans-serif;
}

/* ---------- 基础排版 ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  /* 禁止整页横向滚动（NFR-13）；数据表允许在自己的容器内横滚 */
  overflow-x: hidden;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: var(--fs-md);
  line-height: 1.65;
  color: var(--c-text);
  background: var(--c-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4 {
  line-height: 1.35;
  margin: 0 0 var(--s3);
  font-weight: 700;
}

h1 { font-size: var(--fs-xl); }
h2 { font-size: var(--fs-lg); }
h3 { font-size: var(--fs-md); }

p { margin: 0 0 var(--s3); }

a {
  color: var(--c-primary);
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
}

ul, ol {
  margin: 0 0 var(--s3);
  padding-left: 1.4em;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: #f0f0f0;
  padding: 1px 4px;
  border-radius: 4px;
  font-size: 0.95em;
}

img { max-width: 100%; height: auto; }

/* 无障碍：仅屏幕阅读器可见 */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* 键盘焦点必须可见（触屏也用得上外接键盘） */
:focus-visible {
  outline: 3px solid var(--c-primary);
  outline-offset: 2px;
}

/* ---------- 布局 ---------- */
.page {
  flex: 1 0 auto;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: var(--s4) var(--s4) var(--s6);
}

.page__title {
  margin: var(--s2) 0 var(--s4);
}

/* ---------- 页头与导航 ---------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--c-line);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: var(--s2) var(--s4);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s2);
}

.site-header__brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  min-height: var(--tap);
  color: var(--c-text);
  font-weight: 700;
}

.site-header__brand:hover { text-decoration: none; }

.site-header__title {
  font-size: var(--fs-md);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s1);
  width: 100%;
}

.site-nav__link {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0 var(--s3);
  border-radius: var(--radius);
  color: var(--c-primary);
  font-size: var(--fs-sm);
}

.site-nav__link:hover {
  background: #eef4fb;
  text-decoration: none;
}

/* ---------- 首页 hero 与搜索 ---------- */
.hero {
  padding: var(--s5) 0 var(--s4);
  text-align: center;
}

.hero__title {
  font-size: var(--fs-xl);
  margin-bottom: var(--s4);
}

.search-form {
  max-width: 640px;
  margin: 0 auto;
}

.search-form__label {
  display: block;
  text-align: left;
  font-size: var(--fs-sm);
  color: var(--c-muted);
  margin-bottom: var(--s1);
}

.search-form__row {
  display: flex;
  gap: var(--s2);
}

.search-form__input {
  flex: 1 1 auto;
  min-width: 0;               /* 关键：不加这行，flex 子项的 input 会撑破 375px */
  min-height: var(--tap);
  padding: 0 var(--s3);
  font-size: var(--fs-md);
  font-family: inherit;
  color: var(--c-text);
  border: 1px solid #c9c9c9;
  border-radius: var(--radius);
  background: #fff;
}

.search-form__input:focus {
  border-color: var(--c-primary);
  outline-offset: 0;
}

.search-form__button {
  flex: 0 0 auto;
}

.hot-words {
  margin: var(--s4) 0 0;
  font-size: var(--fs-sm);
  color: var(--c-muted);
  line-height: 2;
}

.hot-words__label {
  color: var(--c-muted);
}

.hot-words__item {
  display: inline-block;
  min-height: 32px;
  line-height: 32px;
  padding: 0 var(--s2);
}

.hot-words__sep {
  color: var(--c-line);
}

/* ---------- 按钮（触控目标 ≥ 44px） ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  min-width: var(--tap);
  padding: 0 var(--s4);
  font-family: inherit;
  font-size: var(--fs-md);
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  text-align: center;
}

.btn:hover { text-decoration: none; }

.btn--primary {
  background: var(--c-primary);
  color: #fff;
}

.btn--primary:hover { background: var(--c-primary-dark); }

.btn--outline {
  background: #fff;
  color: var(--c-primary);
  border-color: var(--c-primary);
}

.btn--outline:hover { background: #eef4fb; }

.btn--ghost {
  background: transparent;
  color: var(--c-primary);
  border-color: var(--c-line);
}

.btn[disabled],
.btn--disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ---------- 三入口卡片 ---------- */
.entry-cards {
  display: grid;
  gap: var(--s4);
  margin: var(--s5) 0;
  grid-template-columns: 1fr;      /* 移动优先：单列 */
}

.entry-card {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: var(--s4);
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}

.entry-card__title {
  font-size: var(--fs-lg);
  margin: 0;
  display: flex;
  align-items: center;
  gap: var(--s2);
}

.entry-card__icon {
  font-size: var(--fs-lg);
}

.entry-card__desc {
  color: var(--c-muted);
  font-size: var(--fs-sm);
  margin: 0;
  flex: 1 1 auto;
}

.entry-card__meta {
  font-size: var(--fs-xs);
  color: var(--c-muted);
  margin: 0;
}

.entry-card__button {
  align-self: stretch;
}

/* ---------- 今天不能办的 ---------- */
.today-block {
  background: #fff;
  border: 1px solid var(--c-line);
  border-left: 4px solid var(--c-primary);
  border-radius: var(--radius);
  padding: var(--s4);
  margin: var(--s5) 0 0;
}

.today-block__title {
  font-size: var(--fs-lg);
  margin: 0 0 var(--s3);
}

.today-block__count {
  color: var(--c-muted);
  font-weight: 400;
  font-size: var(--fs-sm);
}

.today-block__normal {
  color: var(--c-on);
  background: var(--c-on-bg);
  border-radius: var(--radius);
  padding: var(--s3);
  margin: 0;
}

.today-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.today-list__item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s2);
  padding: var(--s2) 0;
  border-bottom: 1px dashed var(--c-line);
  font-size: var(--fs-sm);
}

.today-list__item:last-child { border-bottom: 0; }

.today-list__dept { font-weight: 700; }
.today-list__reason { color: var(--c-muted); }
.today-list__office { color: var(--c-muted); font-size: var(--fs-xs); }

.today-block__more,
.today-block__hint {
  font-size: var(--fs-sm);
  margin: var(--s3) 0 0;
}

/* ---------- 三态徽标（文字 + 图标 + 底色三重编码） ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px var(--s2);
  border-radius: 999px;
  font-size: var(--fs-xs);
  font-weight: 700;
  border: 1px solid transparent;
  white-space: nowrap;
}

.badge__icon { font-size: var(--fs-xs); }

.badge--on_duty {
  color: var(--c-on);
  background: var(--c-on-bg);
  border-color: #b7ddc6;
}

.badge--away {
  color: var(--c-away);
  background: var(--c-away-bg);
  border-color: #f0d3a3;
}

.badge--off {
  color: var(--c-off);
  background: var(--c-off-bg);
  border-color: #f0bcbc;
}

.badge--hidden {
  color: var(--c-muted);
  background: #f2f2f2;
  border-color: var(--c-line);
}

/* ---------- 通用卡片 ---------- */
.card {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: var(--s4);
  margin-bottom: var(--s4);
}

.card__title {
  font-size: var(--fs-lg);
  margin: 0 0 var(--s3);
}

.list {
  margin: 0;
  padding-left: 1.3em;
}

.list li { margin-bottom: var(--s2); }

/* ---------- 表格：窄屏卡片化（td::before 显示 data-label） ---------- */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
  background: #fff;
}

.table caption {
  text-align: left;
  padding-bottom: var(--s2);
  color: var(--c-muted);
  font-size: var(--fs-sm);
}

.table th,
.table td {
  padding: var(--s2) var(--s3);
  border-bottom: 1px solid var(--c-line);
  text-align: left;
  vertical-align: top;
}

.table thead th {
  background: #f4f6f8;
  font-weight: 700;
  white-space: nowrap;
}

/* 仅数据表允许在自己的容器内横滚，整页不滚 */
.scroll-x {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

/* 窄屏（< 768px）：表格变卡片流，信息不删、顺序不变 */
@media (max-width: 767px) {
  .table--stack thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .table--stack tr {
    display: block;
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    margin-bottom: var(--s3);
    padding: var(--s2);
    background: #fff;
  }

  .table--stack td,
  .table--stack th {
    display: block;
    border-bottom: 1px dashed var(--c-line);
    padding: var(--s1) 0;
  }

  .table--stack td:last-child,
  .table--stack th:last-child {
    border-bottom: 0;
  }

  .table--stack td::before {
    content: attr(data-label);
    display: block;
    font-size: var(--fs-xs);
    color: var(--c-muted);
    font-weight: 400;
  }
}

/* ---------- 提示条 / 空状态 / 错误页 ---------- */
.flash-stack {
  margin-bottom: var(--s4);
}

.flash {
  border-radius: var(--radius);
  padding: var(--s3);
  margin: 0 0 var(--s2);
  font-size: var(--fs-sm);
  border: 1px solid var(--c-line);
  background: #fff;
}

.flash--success { background: var(--c-on-bg); border-color: #b7ddc6; color: var(--c-on); }
.flash--error { background: var(--c-off-bg); border-color: #f0bcbc; color: var(--c-off); }
.flash--warning { background: var(--c-away-bg); border-color: #f0d3a3; color: var(--c-away); }
.flash--info { background: #eef4fb; border-color: #c8dcf3; color: var(--c-primary-dark); }

.empty {
  text-align: center;
  padding: var(--s6) var(--s4);
  color: var(--c-muted);
  background: #fff;
  border: 1px dashed var(--c-line);
  border-radius: var(--radius);
}

.empty__icon { font-size: 28px; margin: 0 0 var(--s2); }
.empty__text { margin: 0; }
.empty__hint { margin: var(--s2) 0 0; font-size: var(--fs-sm); }

.error-page {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: var(--s5);
  max-width: 640px;
  margin: var(--s5) auto;
}

.error-page__title {
  font-size: var(--fs-xl);
  margin-bottom: var(--s3);
}

.error-page__message {
  font-size: var(--fs-md);
  margin-bottom: var(--s2);
}

.error-page__action {
  color: var(--c-muted);
  font-size: var(--fs-sm);
}

.error-page__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  margin: var(--s4) 0 var(--s2);
}

.error-page__trace {
  color: var(--c-muted);
  font-size: var(--fs-xs);
  margin: 0;
}

/* ---------- 页脚 ---------- */
.site-footer {
  flex: 0 0 auto;
  background: #fff;
  border-top: 1px solid var(--c-line);
  padding: var(--s4);
  text-align: center;
  color: var(--c-muted);
  font-size: var(--fs-xs);
}

.site-footer__notice { margin: 0 0 var(--s1); }
.site-footer__system { margin: 0; }

/* ---------- 平板及更宽（≥ 768px） ---------- */
@media (min-width: 768px) {
  .page {
    padding: var(--s5) var(--s5) var(--s6);
  }

  .hero {
    padding: var(--s6) 0 var(--s5);
  }

  .hero__title {
    font-size: 32px;
  }

  .entry-cards {
    grid-template-columns: repeat(3, 1fr);
  }

  .site-header__inner {
    flex-wrap: nowrap;
  }

  .site-nav {
    width: auto;
    margin-left: auto;
  }
}

/* ---------- 打印（@media print）：隐藏导航/页脚/按钮，A4 不截断 ---------- */
@media print {
  :root {
    --c-bg: #fff;
    --c-text: #000;
  }

  html,
  body {
    background: #fff;
    color: #000;
    font-size: 12pt;
  }

  .no-print,
  .site-header,
  .site-footer,
  .site-nav,
  .btn,
  .search-form,
  .hot-words {
    display: none !important;
  }

  .page {
    max-width: none;
    padding: 0;
    margin: 0;
  }

  .card,
  .today-block,
  .entry-card,
  table,
  tr,
  .table--stack tr {
    break-inside: avoid;
    page-break-inside: avoid;
    box-shadow: none;
  }

  a[href]::after {
    content: "";
  }

  .badge {
    border: 1px solid #000;
    background: #fff !important;
    color: #000 !important;
  }
}

/* =============================================================================
   T07/T08/T10 前台页面组件（移动优先，延续令牌与 BEM-lite）
   ============================================================================= */

/* ---------- 通用 ---------- */
.muted { color: var(--c-muted); font-size: var(--fs-sm); }

.btn--sm {
  min-height: 36px;
  min-width: auto;
  padding: 0 var(--s3);
  font-size: var(--fs-sm);
}

.breadcrumb { font-size: var(--fs-sm); color: var(--c-muted); margin-bottom: var(--s3); }
.breadcrumb a { color: var(--c-primary); }

/* ---------- 筛选与分页 ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  align-items: flex-end;
  margin: var(--s3) 0;
  padding: var(--s3);
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
}
.filters__item { display: flex; flex-direction: column; gap: var(--s1); }
.filters__label { font-size: var(--fs-xs); color: var(--c-muted); }
.filters select,
.filters__browse {
  min-height: 36px;
  font: inherit;
  font-size: var(--fs-sm);
  border: 1px solid #c9c9c9;
  border-radius: var(--radius);
  background: #fff;
  color: var(--c-text);
  padding: 0 var(--s2);
}
.filters__browse { display: inline-flex; align-items: center; text-decoration: none; color: var(--c-primary); border: none; }

.pager { display: flex; gap: var(--s3); align-items: center; justify-content: center; margin: var(--s4) 0; }
.pager__link { min-height: 36px; display: inline-flex; align-items: center; padding: 0 var(--s3); border: 1px solid var(--c-line); border-radius: var(--radius); background: #fff; }
.pager__info { color: var(--c-muted); font-size: var(--fs-sm); }

/* ---------- 搜索结果 ---------- */
.result-section { margin-bottom: var(--s5); }
.result-hint { color: var(--c-muted); font-size: var(--fs-sm); margin-bottom: var(--s3); }
.result-section__title { font-size: var(--fs-lg); margin-bottom: var(--s3); }
.result-section__count { font-weight: 400; color: var(--c-muted); font-size: var(--fs-sm); }

.result-item {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: var(--s4);
  margin-bottom: var(--s3);
}
.result-item__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.result-item__title { margin: 0; font-size: var(--fs-md); flex: 1 1 auto; }
.result-item__ext {
  font-size: var(--fs-xs);
  color: var(--c-muted);
  border: 1px solid var(--c-line);
  border-radius: 4px;
  padding: 1px 6px;
}
.result-item__note { font-size: var(--fs-xs); color: var(--c-away); }
.result-item__meta { display: flex; flex-wrap: wrap; gap: var(--s1); margin: var(--s2) 0 0; }
.meta-chip {
  font-size: var(--fs-xs);
  color: var(--c-primary-dark);
  background: #eef4fb;
  border-radius: 999px;
  padding: 1px 8px;
}
.meta-chip--year { color: var(--c-on); background: var(--c-on-bg); }
.result-item__snippet { margin: var(--s2) 0 0; font-size: var(--fs-sm); color: #333; }
.result-item__snippet mark { background: #fff3a3; padding: 0 2px; border-radius: 3px; }
.result-item__actions { display: flex; gap: var(--s2); margin-top: var(--s3); }

.guide-results { list-style: none; margin: 0; padding: 0; }
.guide-results__item {
  display: flex;
  gap: var(--s3);
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: var(--s4);
  margin-bottom: var(--s3);
}
.guide-results__main { flex: 1 1 auto; min-width: 0; }
.guide-results__title { font-weight: 700; font-size: var(--fs-md); }
.guide-results__summary { margin: var(--s1) 0 0; font-size: var(--fs-sm); color: var(--c-muted); }
.guide-results__duty { align-self: center; }

/* ---------- 零结果三件套 ---------- */
.zero-result { background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); padding: var(--s5); }
.zero-result__title { font-size: var(--fs-lg); margin-bottom: var(--s4); }
.zero-result__block { margin-bottom: var(--s4); }
.zero-result__label { color: var(--c-muted); font-size: var(--fs-sm); margin-bottom: var(--s2); }
.zero-result__suggest, .zero-result__contact { margin: 0; padding-left: 1.3em; }
.zero-result__suggest li, .zero-result__contact li { margin-bottom: var(--s1); }
.zero-result__indexing { color: var(--c-away); font-size: var(--fs-sm); margin: var(--s3) 0 0; }

/* ---------- 资料库 ---------- */
.library-section { margin-bottom: var(--s5); }
.library-section__title { font-size: var(--fs-lg); margin-bottom: var(--s3); }
.library-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s2);
}
.library-grid__item { background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); }
.library-grid__link, .library-grid__item { display: flex; justify-content: space-between; align-items: center; padding: var(--s3) var(--s4); min-height: var(--tap); }
.library-grid__link { text-decoration: none; color: var(--c-text); }
.library-grid__link:hover { text-decoration: none; background: #eef4fb; }
.library-grid__name { font-weight: 700; }
.library-grid__count { color: var(--c-muted); font-size: var(--fs-sm); }

.file-list { list-style: none; margin: 0; padding: 0; }
.file-list__item {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  align-items: center;
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: var(--s3) var(--s4);
  margin-bottom: var(--s2);
}
.file-list__title { font-weight: 700; flex: 1 1 auto; }
.file-list__ext { font-size: var(--fs-xs); color: var(--c-muted); border: 1px solid var(--c-line); border-radius: 4px; padding: 1px 6px; }
.file-list__meta { font-size: var(--fs-xs); color: var(--c-muted); width: 100%; }

/* ---------- 文件详情 ---------- */
.file-meta__list { margin: 0; }
.file-meta__row { display: flex; gap: var(--s3); padding: var(--s2) 0; border-bottom: 1px dashed var(--c-line); }
.file-meta__row dt { color: var(--c-muted); font-size: var(--fs-sm); min-width: 72px; }
.file-meta__row dd { margin: 0; font-size: var(--fs-sm); }
.file-meta__actions { margin-top: var(--s4); display: flex; gap: var(--s2); flex-wrap: wrap; }

.file-preview__frame { width: 100%; min-height: 480px; border: 1px solid var(--c-line); border-radius: var(--radius); background: #fff; }
.file-preview__actions { margin-top: var(--s3); display: flex; gap: var(--s2); }

/* ---------- 缺文件上报 ---------- */
.report-form { display: flex; flex-direction: column; gap: var(--s4); }
.report-form__item { display: flex; flex-direction: column; gap: var(--s1); }
.report-form__label { font-size: var(--fs-sm); color: var(--c-muted); }
.report-form__input {
  min-height: var(--tap);
  font: inherit;
  font-size: var(--fs-md);
  padding: var(--s2) var(--s3);
  border: 1px solid #c9c9c9;
  border-radius: var(--radius);
}
.report-form textarea.report-form__input { min-height: 96px; }
.report-form__thanks { color: var(--c-on); }

/* ---------- 办事项 ---------- */
.guide-group { margin-bottom: var(--s5); }
.guide-group__title { font-size: var(--fs-lg); margin-bottom: var(--s3); }
.guide-list { list-style: none; margin: 0; padding: 0; }
.guide-list__item { background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); padding: var(--s4); margin-bottom: var(--s3); }
.guide-list__title { font-weight: 700; font-size: var(--fs-md); }
.guide-list__summary { margin: var(--s1) 0 0; font-size: var(--fs-sm); color: var(--c-muted); }
.guide-list__meta { display: flex; flex-wrap: wrap; gap: var(--s3); margin: var(--s2) 0 0; font-size: var(--fs-xs); color: var(--c-muted); }

.guide-summary { color: var(--c-muted); margin: 0 0 var(--s4); }

.guide-duty__placeholder { margin: 0; color: var(--c-muted); font-size: var(--fs-sm); }

.material-list { list-style: none; margin: 0 0 var(--s3); padding: 0; }
.material-list__item { border-bottom: 1px dashed var(--c-line); padding: var(--s2) 0; }
.material-list__label { display: flex; align-items: center; gap: var(--s2); min-height: var(--tap); }
.material-list__check { width: 20px; height: 20px; }
.material-list__name { font-weight: 700; }
.material-list__req { color: var(--c-away); font-size: var(--fs-xs); }
.material-list__detail { margin: var(--s1) 0 0; font-size: var(--fs-sm); color: var(--c-muted); }
.material-list__download { font-size: var(--fs-sm); }
.material-list__actions { display: flex; gap: var(--s2); flex-wrap: wrap; }

.step-list { margin: 0; padding-left: 1.3em; }
.step-list__item { margin-bottom: var(--s3); }
.step-list__title { font-size: var(--fs-md); margin-bottom: var(--s1); }
.step-list__detail { font-size: var(--fs-sm); color: #333; margin: 0 0 var(--s1); }
.step-list__where { font-size: var(--fs-xs); color: var(--c-muted); margin: 0; }

.print-material { list-style: none; margin: 0; padding: 0; }
.print-material__item { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: baseline; padding: var(--s1) 0; border-bottom: 1px dashed var(--c-line); }
.print-material__box { font-size: var(--fs-lg); }
.print-material__req { color: var(--c-muted); font-size: var(--fs-xs); }
.print-material__detail { width: 100%; font-size: var(--fs-sm); color: var(--c-muted); }

/* ---------- 在岗看板 ---------- */
.duty-context { font-size: var(--fs-sm); color: var(--c-muted); }
.duty-toolbar { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; margin-bottom: var(--s3); }
.duty-toolbar__updated { color: var(--c-muted); font-size: var(--fs-xs); }
.duty-summary { font-size: var(--fs-sm); font-weight: 700; margin: var(--s3) 0 var(--s2); }
.duty-hidden-note { color: var(--c-muted); font-size: var(--fs-sm); }
.duty-legend { margin-bottom: var(--s3); }

.duty-table { font-size: var(--fs-sm); }
.duty-row--on_duty { border-left: 4px solid var(--c-on); }
.duty-row--away { border-left: 4px solid var(--c-away); }
.duty-row--off { border-left: 4px solid var(--c-off); }
.duty-row__overdue { color: var(--c-off); font-size: var(--fs-xs); margin-left: var(--s1); }
.duty-row__none { color: var(--c-muted); }

/* ---------- 打印页 ---------- */
.print-page { background: #fff; }

/* ---------- 平板及更宽 ---------- */
@media (min-width: 768px) {
  .library-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- 智能回答（检索增强） ---------- */
.answer {
  background: #fff;
  border: 1px solid var(--c-line);
  border-left: 4px solid var(--c-primary);
  border-radius: var(--radius);
  padding: var(--s4);
  margin: 0 0 var(--s4);
}
.answer__question { font-size: var(--fs-sm); color: var(--c-muted); font-weight: 400; margin: 0 0 var(--s1); }
.answer__title { font-size: var(--fs-lg); margin: 0 0 var(--s2); }
.answer__text { font-size: var(--fs-md); line-height: 1.8; margin: 0 0 var(--s3); }
.answer__cites { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin: 0 0 var(--s2); }
.answer__cites-label { font-size: var(--fs-sm); color: var(--c-muted); }
.answer__chip {
  display: inline-block;
  font-size: var(--fs-sm);
  color: var(--c-primary);
  border: 1px solid var(--c-line);
  border-radius: 999px;
  padding: 2px 10px;
  text-decoration: none;
}
.answer__chip:hover { border-color: var(--c-primary); }
.answer__quotes { margin: 0 0 var(--s3); padding-left: var(--s5); font-size: var(--fs-sm); color: var(--c-muted); }
.answer__quotes li { margin: 0 0 var(--s1); }
.answer__quotes q { color: var(--c-text); }
.answer__warn { margin: 0 0 var(--s3); padding-left: var(--s5); font-size: var(--fs-sm); color: #8a5a00; }
.answer__note { margin: 0; font-size: var(--fs-xs); color: var(--c-muted); }
.answer__points { margin: 0 0 var(--s3); padding: 0; }
.answer__point { display: flex; gap: var(--s3); padding: var(--s2) 0; border-top: 1px dashed var(--c-line); }
.answer__point dt { flex: 0 0 5.5em; font-size: var(--fs-sm); color: var(--c-muted); }
.answer__point dd { margin: 0; font-size: var(--fs-sm); line-height: 1.7; }
.answer__also { margin: 0 0 var(--s2); font-size: var(--fs-sm); color: var(--c-muted); }
.plain-list { margin: 0 0 var(--s3); padding-left: var(--s5); }
.table__wrap { max-width: 22em; word-break: break-all; }

/* ---------- 提示条 ---------- */
.notice {
  background: var(--c-bg);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: var(--s4);
  margin: 0 0 var(--s4);
}
.notice__title { font-size: var(--fs-lg); margin: 0 0 var(--s2); }
.notice__actions { display: flex; flex-wrap: wrap; gap: var(--s2); margin: 0; }
.notice--warn { border-color: #e6c98a; background: #fffaf0; }

/* ---------- 识别文本（文字版） ---------- */
.ocr-text summary { cursor: pointer; color: var(--c-primary); font-size: var(--fs-sm); padding: var(--s2) 0; }
.ocr-text__body {
  margin: var(--s2) 0 0;
  padding: var(--s3);
  background: var(--c-bg);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: var(--fs-sm);
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 420px;
  overflow: auto;
}
