/* 证书比价（/certificates/）专用样式。颜色只用 site.css 的变量。 */

.cert-notes { margin: 0 0 16px; }
.cert-note { padding: 12px 16px; margin: 0 0 12px; border-left: 3px solid var(--info); background: var(--info-soft); border-radius: var(--radius); font-size: .95rem; }
.cert-note p { margin: 0; }
.cert-small { font-size: .88rem; }

.cert-types { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 16px 0; }
.cert-types-label { color: var(--muted); font-size: .9rem; margin-right: 4px; }
.cert-types .badge { text-decoration: none; }
.cert-types .badge:hover { background: var(--accent-soft); color: var(--accent-strong); }

/* 筛选条 */
.cert-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 16px 0 8px; padding: 12px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius); }
.cert-filter input[type="search"] { flex: 1 1 220px; min-width: 0; }
.cert-filter select { flex: 0 1 220px; min-width: 0; max-width: 100%; }
.cert-filter input[type="number"] { flex: 0 1 130px; min-width: 0; width: 130px; }
.cert-filter input, .cert-filter select { padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--fg); font: inherit; }
.cert-check { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: .95rem; }
.cert-filter output { margin-left: auto; font-size: .9rem; }

.cert-group { margin: 24px 0; }
.cert-group[hidden] { display: none; }

/* 比较表 */
.cert-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.cert-table th, .cert-table td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.cert-table thead th { background: var(--bg-soft); font-size: .82rem; font-weight: 600; color: var(--fg-soft); white-space: nowrap; }
.cert-table tbody tr:last-child th, .cert-table tbody tr:last-child td { border-bottom: 0; }
.cert-table tbody th { font-weight: 600; }
.cert-table tr[hidden] { display: none; }
.cert-table .num { text-align: right; white-space: nowrap; }
.cert-table caption { text-align: left; padding: 8px 12px; font-weight: 600; caption-side: top; }
.cert-brand { display: block; font-weight: 400; font-size: .82rem; color: var(--muted); white-space: normal; }
.cert-table .num .cert-brand { text-align: right; }
.cert-buy { padding: 6px 12px; font-size: .88rem; }

.cert-hero-price { font-size: 1.05rem; margin: 8px 0 0; }
.cert-hero-price strong { font-size: 1.4rem; }
.cert-specs { margin-top: 8px; }

@media (max-width: 600px) {
  .cert-table { font-size: .9rem; }
  .cert-table th, .cert-table td { padding: 8px; }
  .cert-filter output { margin-left: 0; width: 100%; }
  .cert-buy { padding: 6px 10px; }
}

/* 窄屏下 .article-layout 是 1fr（= minmax(auto, 1fr)），宽表格/代码块会把整列撑宽；这里让网格子项可以收缩 */
.article-layout > * { min-width: 0; }
