/* ============================================================
   SciTools Lab · GitHub 风扁平卡片（cards.css）
   在 style.css 之后加载：只调整「容器 / 卡片 / 标题图标」的
   观感（去阴影、压圆角、取消 hover 位移、emoji→单色图标），
   绝不触碰 input / select / textarea / .row / .result-* 等
   工具页功能性样式。
   ============================================================ */

/* ---------- 单色图标 ---------- */
.g-ic {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: var(--accent);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -3px;
}
.tool-card h3 .g-ic { width: 19px; height: 19px; color: var(--accent); }
h3 .g-ic + .g-ic { margin-left: -2px; }

/* ---------- 扁平原：去阴影、压圆角 ---------- */
.tool-card {
  border-radius: 10px;
  box-shadow: none;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 18px 20px;
}
.tool-card h3 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 17px; }

/* ---------- 工具卡片（板块页 / 首页共用） ---------- */
.tool-grid, .soft-grid { gap: 12px; margin: 16px 0 4px; }

.tool-tile, .soft-tile {
  position: relative;
  border-radius: 10px;
  padding: 15px 16px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  transition: border-color .15s, background .15s;
  display: block;
}
.tool-tile:hover, .soft-tile:hover {
  border-color: var(--muted);
  background: var(--card);
  text-decoration: none;
  transform: none;
}
.tool-tile .ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: var(--card);
  border: 1px solid var(--border-muted, var(--border));
  margin-bottom: 10px;
  font-size: 0;           /* 清掉旧 emoji 的字号 */
  line-height: 0;
}
.tool-tile .ic .g-ic { width: 17px; height: 17px; }
.tool-tile h3 {
  margin: 0 0 5px;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}
.tool-tile h3 small { font-size: 12px; color: var(--muted); font-weight: 400; }
.tool-tile p {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.55;
}

/* 软件 tile（彩色 logo 保留，仅压扁平） */
.soft-tile .soft-logo { height: 26px; margin-bottom: 10px; opacity: .92; }
.soft-tile h3:not(.sr-only) { font-size: 15px; margin: 0 0 5px; font-weight: 600; }
.soft-tile p { margin: 0; font-size: 12.5px; color: var(--muted); }

/* ---------- 标签药丸（中性灰，accent 只留给链接） ---------- */
.gtags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.gtag {
  font-size: 11px;
  line-height: 1.75;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--muted);
  white-space: nowrap;
}

/* ---------- 计数条（GitHub 搜索页风格） ---------- */
.results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 22px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.results-head .count { font-size: 13px; color: var(--muted); }
.results-head b { color: var(--text); font-weight: 600; }

/* ---------- 分区标题 ---------- */
.section-h {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  margin: 30px 0 4px;
  color: var(--text);
}
.section-h .g-ic { color: var(--accent); }

/* ---------- 卡片内子工具清单 ---------- */
.gtools {
  margin: 9px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.gtools::before {
  content: "内含 ";
  color: var(--text);
  font-weight: 600;
}

/* ---------- 计数徽标 ---------- */
.gcount {
  display: inline-block;
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 8px;
  background: var(--card);
  margin-left: 4px;
  white-space: nowrap;
}

/* ---------- 外链列表：GitHub 风紧凑行 ---------- */
.ext-db {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
}
.ext-db li {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-soft);
  padding: 8px 11px;
  font-size: 13px;
  line-height: 1.5;
}
.ext-db b { font-weight: 600; }
.ext-db a { color: var(--accent-2); }

/* ---------- 提示条 ---------- */
/* 仅作用于 .note（信息提示条，左侧中性竖线）。.seed-note 的琥珀色边框由 style.css 统一定义，
   此处不能共用，否则会被 border-left 覆盖成灰色、与另外三边颜色不一致。 */
.note {
  border-left: 2px solid var(--border);
  background: var(--bg-soft);
  color: var(--muted);
  border-radius: 0 8px 8px 0;
}

/* ---------- 窄屏 ---------- */
@media (max-width: 640px) {
  .tool-card { padding: 15px 16px; }
  .ext-db { grid-template-columns: 1fr; }
}
/* ---------- 数据库子分组标题（计算化学内 DFT / MD / 综合性） ---------- */
.db-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin: 16px 0 7px;
  padding-left: 2px;
}
.db-sub .g-ic { width: 14px; height: 14px; color: var(--accent); }
.db-sub small { font-weight: 400; color: var(--muted); font-size: 11px; margin-left: 1px; }

/* ---------- 外部数据库卡片（databases.html 用） ---------- */
.db-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 10px;
  margin: 2px 0 6px;
}
.db-card {
  display: block;
  padding: 11px 13px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  transition: border-color .12s, transform .12s;
}
.db-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  text-decoration: none;
}
.db-card h4 {
  margin: 0;
  font-size: 13.5px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
}
.db-card h4 small { color: var(--muted); font-size: 10.5px; font-weight: 400; }
.db-card p { margin: 5px 0 0; font-size: 12px; color: var(--muted); line-height: 1.55; }
.db-card p .en { display: block; font-size: 11px; opacity: .85; margin-top: 2px; }
