/* ============================================================
 * components.css — 通用组件样式
 * 通用：数据口径条 topbar、卡片 card、科目标签 tag、按钮 btn、占位骨架
 * 宣传首页（T1-A）：hero、区块标题、价值点卡、适用用户、三步骤、
 *                  截图占位、入口卡与小程序入口卡、页脚链接
 * 响应式：移动优先，配合 base.css 的 768 / 1024 断点
 * ============================================================ */

/* ---------- 数据口径条（工具页使用，spec §4.3） ---------- */
.topbar {
  min-height: var(--topbar-height);
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--topbar-border);
  color: var(--topbar-text);
  display: flex;
  align-items: center;
  font-size: 13px;
}

.topbar .container {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  padding-top: 6px;
  padding-bottom: 6px;
}

.topbar__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.topbar__item strong {
  font-weight: 600;
}

/* 核验状态徽标：未核验 = 警示色，不得呈现为“官方确认”（spec §3.2） */
.topbar__badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.6;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}

.topbar__badge.is-reviewed {
  background: #dcfce7;
  color: #166534;
  border-color: #86efac;
}

/* 口径尚未经 adapter 填充时的占位样式 */
.topbar__placeholder {
  color: #93c5fd;
  letter-spacing: 2px;
  user-select: none;
}

/* ---------- 卡片 ---------- */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 20px;
}

/* ---------- 科目标签（class 名与 data/majorData.js 的 SUBJECT_CLASS 对齐） ---------- */
.tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  line-height: 1.7;
  border: 1px solid transparent;
  white-space: nowrap;
}

.tag-physics   { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.tag-history   { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.tag-chemistry { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.tag-biology   { background: #ecfeff; color: #0e7490; border-color: #a5f3fc; }
.tag-politics  { background: #fff1f2; color: #be123c; border-color: #fecdd3; }
.tag-geography { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.tag-free      { background: #f3f4f6; color: #4b5563; border-color: #e5e7eb; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-primary);
  background: var(--color-primary);
  color: #fff;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease;
  min-height: 40px;
}

.btn:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  text-decoration: none;
  color: #fff;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn--ghost {
  background: var(--color-surface);
  color: var(--color-primary);
}

.btn--ghost:hover {
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
}

/* 大按钮：宣传首页主行动按钮，触屏命中区 ≥44px（W06） */
.btn--lg {
  padding: 13px 28px;
  font-size: 16px;
  min-height: 48px;
  border-radius: var(--radius-md);
  width: 100%;
}

@media (min-width: 768px) {
  .btn--lg { width: auto; }
}

/* 空壳页面占位（T0 遗留：combo/major 页仍在使用） */
.shell-placeholder {
  max-width: 720px;
  margin: 48px auto;
  text-align: center;
}

.shell-placeholder h1 {
  margin-bottom: 12px;
  color: var(--color-text);
}

.shell-placeholder p {
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.shell-placeholder .shell-batch {
  display: inline-block;
  margin-top: 12px;
  padding: 2px 10px;
  border-radius: var(--radius-sm);
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
  font-size: 12px;
}

/* ============================================================
 * 宣传首页组件（T1-A）
 * ============================================================ */

/* ---------- 通用区块 ---------- */
.home-section {
  padding: 40px 0;
  scroll-margin-top: 96px; /* 锚点定位时避开吸顶头栏（移动端两行头栏） */
}

@media (min-width: 768px) {
  .home-section { padding: 64px 0; scroll-margin-top: 80px; }
}

.home-section--alt {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 28px;
}

.section-eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-primary);
  background: var(--color-primary-light);
  padding: 2px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.section-head h2 {
  margin-bottom: 10px;
}

.section-head p {
  color: var(--color-text-muted);
}

/* ---------- ① Hero：一句话价值主张 ---------- */
.hero {
  background: linear-gradient(180deg, var(--color-primary-light) 0%, var(--color-bg) 100%);
  border-bottom: 1px solid var(--topbar-border);
  padding: 44px 0 40px;
}

.hero__inner {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}

.hero__title {
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.hero__title .accent {
  color: var(--color-primary);
}

.hero__sub {
  font-size: 15px;
  color: var(--color-text-secondary);
  max-width: 640px;
  margin: 0 auto;
}

.hero__meta {
  margin-top: 16px;
  font-size: 13px;
  color: var(--color-text-muted);
}

@media (min-width: 768px) {
  .hero { padding: 72px 0 64px; }
  .hero__sub { font-size: 17px; }
}

/* ---------- 价值点卡（口径透明，不虚构效果） ---------- */
.value-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.value-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-card);
}

.value-card__icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--color-primary-light);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 12px;
}

.value-card h3 {
  margin-bottom: 6px;
}

.value-card p {
  font-size: 13px;
  color: var(--color-text-muted);
}

@media (min-width: 768px) {
  .value-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
}

/* ---------- ② 适用用户 ---------- */
.audience-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  max-width: 820px;
  margin: 0 auto;
}

.audience-card {
  display: flex;
  gap: 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-card);
}

.audience-card__icon {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-primary-light);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.audience-card h3 { margin-bottom: 4px; }
.audience-card p { font-size: 13px; color: var(--color-text-muted); }

@media (min-width: 768px) {
  .audience-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
}

/* ---------- ③ 三个使用步骤（过程示意） ---------- */
.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  counter-reset: step;
}

.step-card {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 22px 18px 18px;
  box-shadow: var(--shadow-card);
}

.step-card__num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.step-card h3 { margin-bottom: 6px; }
.step-card p { font-size: 13px; color: var(--color-text-muted); }

.step-card__tag {
  display: inline-block;
  margin-top: 10px;
  font-size: 12px;
  color: var(--topbar-text);
  background: var(--topbar-bg);
  border: 1px solid var(--topbar-border);
  padding: 1px 10px;
  border-radius: 999px;
}

@media (min-width: 768px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}

/* ---------- ④ 功能截图位（素材未提供：占位框 + 「示例」标记） ---------- */
.shots-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.shot {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-surface);
}

.shot__frame {
  position: relative;
  aspect-ratio: 16 / 10;
  background:
    repeating-linear-gradient(45deg, #f1f5f9 0, #f1f5f9 12px, #f8fafc 12px, #f8fafc 24px);
  border-bottom: 1px dashed var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: 13px;
  text-align: center;
  padding: 16px;
}

.shot__demo-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(31, 41, 55, 0.85);
  color: #fff;
  font-size: 12px;
  padding: 2px 10px;
  border-radius: var(--radius-sm);
}

.shot__caption {
  padding: 12px 14px;
  font-size: 13px;
}

.shot__caption strong {
  display: block;
  margin-bottom: 2px;
  color: var(--color-text);
}

.shot__caption span {
  color: var(--color-text-muted);
  font-size: 12px;
}

@media (min-width: 768px) {
  .shots-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}

/* ---------- ⑤ 两个入口：免费体验查询 / 进入小程序 ---------- */
.entry-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  max-width: 860px;
  margin: 0 auto;
}

.entry-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.entry-card--primary {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}

.entry-card h3 { font-size: 18px; }

.entry-card p {
  font-size: 13px;
  color: var(--color-text-secondary);
  flex: 1;
}

.entry-card__note {
  font-size: 12px;
  color: var(--color-text-muted);
}

.entry-card .btn { margin-top: 4px; }

@media (min-width: 768px) {
  .entry-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
}

/* 点击占位入口后出现的诚实提示（home.js 控制显隐，不伪造跳转成功） */
.placeholder-note {
  display: none;
  max-width: 860px;
  margin: 16px auto 0;
  padding: 10px 14px;
  border: 1px solid #fcd34d;
  background: #fffbeb;
  color: #92400e;
  border-radius: var(--radius-sm);
  font-size: 13px;
  text-align: center;
}

.placeholder-note.is-visible {
  display: block;
}

/* ---------- ⑥ 页脚链接 ---------- */
.site-footer .footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin-bottom: 8px;
}

.site-footer .footer-links a {
  color: var(--color-text-secondary);
  font-size: 13px;
}

.site-footer .footer-meta {
  margin-top: 6px;
  font-size: 12px;
}

/* ---------- W05 数据模式状态行（spec §4.3：local/http 模式 UI 可辨） ---------- */
.data-status {
  margin: 10px auto 0;
  font-size: 12px;
  line-height: 1.7;
  color: var(--color-text-muted);
  text-align: center;
  word-break: break-word;
  overflow-wrap: anywhere;   /* 长口径串在 375px 下也不撑破容器 */
}

.data-status__sep {
  margin: 0 2px;
  color: var(--color-border);
}

.data-status[data-state="local"] .data-status__mode {
  color: var(--color-text-secondary);
  font-weight: 600;
}

.data-status[data-state="http"] .data-status__mode {
  color: var(--color-primary);
  font-weight: 600;
}

.data-status__verify {
  color: var(--color-warning);
  font-weight: 600;
}

.data-status__verify.is-verified {
  color: var(--color-success);
}

/* 错误态：红色可见提示（http 未配置 / 请求失败；不回退、不冒充在线成功） */
.data-status[data-state="error"] {
  color: var(--color-danger);
}

.data-status__err {
  font-weight: 600;
}

.data-status__err-detail {
  display: block;
  margin-top: 2px;
  font-size: 12px;
}

/* ============================================================
 * T1-C 免费工具页：页头 / 口径面板 / 入口卡 / 筛选 / 列表 /
 *                  详情 / 组合比较 / 数据表 / 状态卡
 * 移动优先：手机单列，≥768px 多列；宽表一律进 .table-scroll
 * ============================================================ */

/* ---------- 工具页页头 ---------- */
.page-head {
  padding: 24px 0 16px;
}

.page-head h1 {
  font-size: clamp(20px, 5.4vw, 28px);
  margin-bottom: 8px;
}

.page-head p {
  color: var(--color-text-secondary);
  font-size: 14px;
  line-height: 1.7;
  max-width: 720px;
}

/* ---------- 数据口径面板（tools.html） ---------- */
.scope-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 16px;
  margin-bottom: 20px;
}

.scope-panel[data-state="preparing"] {
  border-left-color: var(--color-warning);
}

.scope-panel[data-state="error"] {
  border-left-color: var(--color-danger);
  color: var(--color-danger);
}

.scope-panel__title {
  font-size: 16px;
  margin-bottom: 10px;
}

.scope-panel__loading {
  color: var(--color-text-muted);
  margin: 0;
}

.scope-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px 16px;
  margin: 0;
}

.scope-grid div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
}

.scope-grid dt {
  color: var(--color-text-muted);
  font-size: 12px;
  min-width: 64px;
}

.scope-grid dd {
  font-size: 14px;
  font-weight: 500;
}

.scope-panel__tip {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--color-text-muted);
}

.scope-panel__reason {
  margin: 8px 0 16px;
  font-size: 13px;
  color: var(--color-warning);
}

.verify-badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.7;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
  font-weight: 400;
}

.verify-badge.is-verified {
  background: #dcfce7;
  color: #166534;
  border-color: #86efac;
}

@media (min-width: 768px) {
  .scope-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .scope-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---------- 工具入口卡（tools.html） ---------- */
.tool-entry-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.tool-entry-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tool-entry-card h2 {
  font-size: 17px;
}

.tool-entry-card p {
  color: var(--color-text-secondary);
  font-size: 14px;
  line-height: 1.7;
  flex: 1;
}

.tool-entry-card__btn {
  align-self: stretch;
  text-decoration: none;
}

.tool-entry-grid[data-disabled="true"] .tool-entry-card {
  opacity: 0.55;
}

.tool-entry-card__btn.is-disabled {
  pointer-events: none;
}

.tool-notes {
  font-size: 12px;
  color: var(--color-text-muted);
  line-height: 1.8;
  text-align: center;
  margin-bottom: 8px;
}

@media (min-width: 768px) {
  .tool-entry-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .tool-entry-card__btn {
    align-self: flex-start;
  }
}

/* ---------- 筛选表单（query.html） ---------- */
.filter-form {
  margin-bottom: 16px;
  padding: 16px;
}

.filter-form__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--color-text-secondary);
}

.filter-field input,
.filter-field select,
.combo-picker select {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--color-text);
  background: var(--color-surface);
  box-sizing: border-box;
}

.filter-field input:focus,
.filter-field select:focus,
.combo-picker select:focus {
  outline: 2px solid var(--color-primary-light);
  border-color: var(--color-primary);
}

.filter-form[aria-disabled="true"] input,
.filter-form[aria-disabled="true"] select,
.filter-form[aria-disabled="true"] button {
  opacity: 0.55;
  pointer-events: none;
}

.filter-form__actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

@media (min-width: 768px) {
  .filter-form {
    padding: 20px;
  }
  .filter-form__row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
}

@media (min-width: 1024px) {
  .filter-form__row {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

/* ---------- 结果计数条 ---------- */
.result-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.result-bar__count {
  font-size: 14px;
  color: var(--color-text-secondary);
}

.result-bar__count::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-primary);
  margin-right: 8px;
  vertical-align: 1px;
}

/* ---------- 查询结果列表 ---------- */
.req-list {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.req-item {
  width: 100%;
  text-align: left;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: border-color 0.15s ease;
}

.req-item:hover {
  border-color: var(--color-primary);
}

.req-item__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
}

.req-item__majors {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.req-item__side {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.req-item__type {
  font-size: 12px;
  color: var(--color-text-muted);
}

.req-item__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.req-subj {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.req-subj em {
  font-style: normal;
  font-size: 12px;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0 6px;
  line-height: 1.8;
}

.req-subj--required em {
  color: var(--color-primary-dark);
  border-color: #bfdbfe;
  background: var(--color-primary-light);
}

.req-subj--suggested em {
  color: #92400e;
  border-color: #fcd34d;
  background: #fffbeb;
}

.req-subj--unknown em {
  color: var(--color-danger);
  border-color: #fecaca;
  background: #fef2f2;
}

@media (min-width: 768px) {
  .req-item {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
  }
  .req-item__main {
    flex: 1;
    min-width: 0;
  }
  .req-item__side {
    align-items: flex-end;
    text-align: right;
    flex-shrink: 0;
    max-width: 46%;
  }
  .req-item__tags {
    justify-content: flex-end;
  }
}

/* ---------- 详情面板（query.html） ---------- */
.detail-panel {
  margin-bottom: 16px;
  border-left: 4px solid var(--color-primary);
}

.detail-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.detail-panel__head h2 {
  font-size: 17px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 0;
}

.detail-grid > div {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 10px;
  align-items: start;
}

.detail-grid dt {
  font-size: 13px;
  color: var(--color-text-muted);
}

.detail-grid dd {
  font-size: 14px;
  line-height: 1.7;
  min-width: 0;
}

.detail-grid__wide {
  grid-column: 1 / -1;
}

.detail-major-list {
  margin: 0;
  padding-left: 18px;
}

.is-unknown {
  color: var(--color-danger);
  font-weight: 600;
}

.detail-panel__note {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--color-border);
  font-size: 12px;
  color: var(--color-text-muted);
  line-height: 1.7;
}

@media (min-width: 768px) {
  .detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .detail-grid .detail-grid__wide {
    grid-column: 1 / -1;
  }
  .detail-grid > div:has(.detail-grid__wide) {
    grid-column: 1 / -1;
    grid-template-columns: 88px 1fr;
  }
}

/* ---------- 空态 / 筹备中 / 错误态 ---------- */
.empty-state,
.preparing-state,
.error-state {
  text-align: center;
  padding: 28px 20px;
  margin-bottom: 20px;
}

.empty-state h2,
.preparing-state h2,
.error-state h2 {
  font-size: 16px;
  margin-bottom: 8px;
}

.empty-state p,
.preparing-state p,
.error-state p {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

.empty-state__tip {
  margin-top: 10px;
  font-size: 12px;
  color: var(--color-text-muted);
}

.preparing-state {
  border-left: 4px solid var(--color-warning);
}

.error-state {
  border-left: 4px solid var(--color-danger);
}

.error-state h2,
.error-state p {
  color: var(--color-danger);
}

/* ---------- 组合比较（combo.html） ---------- */
.combo-picker {
  margin-bottom: 16px;
}

.combo-picker__field {
  max-width: 420px;
}

.combo-picker__subjects {
  margin: 12px 0 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}

.combo-result {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}

.combo-score {
  text-align: center;
  border-left: 4px solid var(--color-primary);
}

.combo-score h2 {
  font-size: 15px;
  color: var(--color-text-secondary);
}

.combo-score__num {
  margin: 8px 0 2px;
  font-size: 15px;
  color: var(--color-text-secondary);
}

.combo-score__num strong {
  font-size: 34px;
  color: var(--color-primary);
  vertical-align: -2px;
}

.combo-score__den {
  font-size: 14px;
}

.combo-score__rate {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.combo-score__tip {
  font-size: 12px;
  color: var(--color-text-muted);
  margin: 0;
}

.combo-group > summary {
  cursor: pointer;
  font-size: 15px;
  padding: 4px 0;
  user-select: none;
}

.combo-group[open] > summary {
  margin-bottom: 12px;
}

.combo-group__empty {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--color-text-muted);
}

.combo-notes h2 {
  font-size: 15px;
  margin-bottom: 8px;
}

.combo-notes ul {
  margin: 0;
  padding-left: 20px;
}

.combo-notes li {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.8;
}

/* ---------- 数据表（宽表在 .table-scroll 内局部滚动） ---------- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th,
.data-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
  vertical-align: top;
  line-height: 1.6;
}

.data-table th {
  background: var(--color-bg);
  color: var(--color-text-secondary);
  font-weight: 600;
  white-space: nowrap;
}

.data-table td.is-restricted {
  color: var(--color-danger);
  white-space: nowrap;
}

/* ====================================================================
 * T1-D：全站备案页脚 / 内容页（about/faq）/ 小程序引导卡 / 专业详情
 * 移动优先，768/1024 断点；不产生整页横向溢出。
 * ==================================================================== */

/* ---------- 全站统一页脚：备案链接 + 主体 ---------- */
.footer-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-top: 6px;
  font-size: 12px;
}

.footer-beian {
  color: var(--color-text-secondary);
  text-decoration: none;
}

.footer-beian:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

.footer-meta__sep {
  color: var(--color-border);
}

/* ---------- 小程序引导卡（首页，按终端由 home.js 显示其一） ---------- */
.entry-card--mini {
  border-style: dashed;
}

.mp-guide {
  margin-bottom: 14px;
  text-align: left;
}

.mp-guide p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--color-text-secondary);
  margin: 0 0 8px;
}

.mp-steps {
  margin: 0;
  padding-left: 20px;
  font-size: 13px;
  line-height: 1.9;
  color: var(--color-text-secondary);
}

.mp-guide__tip {
  font-size: 12px;
  color: var(--color-text-muted);
}

.entry-card--mini .btn {
  width: 100%;
}

/* ---------- 内容页通用（about / faq） ---------- */
.content-page .page-head {
  margin-bottom: 18px;
}

.content-section {
  margin-bottom: 16px;
  padding: 20px 18px;
}

.content-section h2 {
  font-size: 17px;
  margin-bottom: 10px;
}

.content-section h3 {
  font-size: 15px;
  margin: 18px 0 8px;
}

.content-section p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--color-text-secondary);
  margin-bottom: 8px;
}

.content-section a {
  color: var(--color-primary);
}

.content-list {
  margin: 8px 0 4px;
  padding-left: 20px;
}

.content-list li {
  font-size: 14px;
  line-height: 1.8;
  color: var(--color-text-secondary);
  margin-bottom: 4px;
}

.content-note {
  border-left: 3px solid var(--color-warning);
  background: var(--color-bg);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
}

/* 关于页：功能 / 主体 / 联系定义列表 */
.tool-howto {
  margin: 8px 0;
  padding-left: 22px;
}

.tool-howto li {
  margin-bottom: 10px;
}

.tool-howto h4 {
  font-size: 14px;
  margin-bottom: 2px;
}

.tool-howto p {
  font-size: 13px;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 8px;
}

.about-grid > div {
  background: var(--color-bg);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.about-grid dt {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}

.about-grid dd {
  font-size: 14px;
  line-height: 1.7;
  color: var(--color-text);
}

.preparing-inline {
  display: inline-block;
  padding: 2px 10px;
  border: 1px dashed var(--color-border);
  border-radius: 999px;
  color: var(--color-text-muted);
  font-size: 13px;
}

.about-grid--placeholder dd {
  color: var(--color-text-muted);
}

/* FAQ */
.faq-toolbar {
  margin-top: 12px;
  text-align: right;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  padding: 0;
  overflow: hidden;
}

.faq-item > summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 40px 16px 18px;
  position: relative;
  user-select: none;
}

.faq-item > summary::-webkit-details-marker {
  display: none;
}

.faq-item > summary::after {
  content: '+';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  color: var(--color-text-muted);
  line-height: 1;
}

.faq-item[open] > summary::after {
  content: '−';
}

.faq-item > summary h2 {
  font-size: 15px;
  line-height: 1.5;
  color: var(--color-text);
}

.faq-item__body {
  padding: 0 18px 16px;
}

.faq-item__body p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--color-text-secondary);
  margin-bottom: 8px;
}

.faq-item__body a {
  color: var(--color-primary);
}

.faq-note {
  font-size: 12px;
  color: var(--color-text-muted);
  border-left: 3px solid var(--color-border);
  padding-left: 10px;
}

.faq-more {
  margin-top: 18px;
  font-size: 13px;
  color: var(--color-text-muted);
  text-align: center;
  line-height: 1.8;
}

.faq-more a {
  color: var(--color-primary);
}

/* ---------- 专业详情（major.html） ---------- */
.major-loading {
  padding: 40px 0;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 14px;
}

.major-crumbs {
  margin-bottom: 12px;
}

.major-crumbs a {
  font-size: 13px;
  color: var(--color-primary);
}

.major-card {
  padding: 22px 18px;
}

.major-card__category {
  font-size: 13px;
  color: var(--color-primary);
  font-weight: 600;
}

.major-card__head h1 {
  font-size: 20px;
  margin: 4px 0 10px;
}

.major-card__oneline {
  font-size: 14px;
  line-height: 1.8;
  color: var(--color-text);
}

.major-card__scope {
  margin-top: 8px;
  font-size: 12px;
  color: var(--color-warning);
}

.major-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 16px 0;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
}

.major-grid dt {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}

.major-grid dd {
  font-size: 14px;
}

.major-subj-tag,
.major-combo-tag {
  display: inline-block;
  padding: 3px 10px;
  margin: 0 6px 6px 0;
  border-radius: 999px;
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-size: 13px;
  font-weight: 600;
}

.major-subj-tag--first {
  background: var(--color-primary);
  color: #fff;
}

.major-combo-tag {
  background: var(--color-bg);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  font-weight: 500;
}

.major-combo-tag__id {
  margin-left: 6px;
  font-size: 11px;
  color: var(--color-text-muted);
  font-family: ui-monospace, Consolas, monospace;
}

.major-unknown {
  font-size: 13px;
  color: var(--color-danger);
}

.major-combos {
  border-top: 1px solid var(--color-border);
  padding-top: 14px;
}

.major-combos h2 {
  font-size: 15px;
  margin-bottom: 8px;
}

.major-combos__label {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin-bottom: 4px;
}

.major-combos__tags {
  margin-bottom: 10px;
}

.major-combos__note {
  font-size: 13px;
  line-height: 1.7;
  color: var(--color-text-secondary);
  background: var(--color-bg);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
}

.major-disclaimer {
  margin-top: 16px;
  border-top: 1px solid var(--color-border);
  padding-top: 14px;
}

.major-disclaimer h2 {
  font-size: 14px;
  margin-bottom: 6px;
}

.major-disclaimer a {
  color: var(--color-primary);
}

.major-empty {
  max-width: 560px;
  margin: 0 auto;
}

.major-empty code {
  word-break: break-all;
}

@media (min-width: 768px) {
  .content-section {
    padding: 26px 28px;
  }

  .about-grid,
  .major-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .major-card {
    padding: 28px 32px;
  }

  .entry-card--mini .btn {
    width: auto;
  }
}
