/* ==========================================================================
   DigiBridge数字桥 · B方案蓝白青视觉规范与认证项目筛选页样式
   严格对齐原B方案17图之「04_认证项目筛选页.png」与多端适配标准
   ========================================================================== */

:root {
  --b-primary: #23468b;
  --b-primary-hover: #1b3976;
  --b-primary-active: #152e62;
  --b-primary-light: #edf2fc;
  --b-primary-border: #b2c4e3;

  --b-dark: #19365e;
  --b-dark-title: #1e3b70;
  --b-text-main: #18314e;
  --b-text-muted: #4b607c;
  --b-text-sub: #566b88;

  --b-border: #c5d2e6;
  --b-border-subtle: #dfe7f2;
  --b-bg-page: #f4f7fc;
  --b-bg-card: #ffffff;
  --b-bg-input: #ffffff;

  --b-badge-blue-bg: #e0f2fe;
  --b-badge-blue-text: #0284c7;
  --b-badge-teal-bg: #ccfbf1;
  --b-badge-teal-text: #0f766e;
  --b-badge-sample-bg: #f1f5f9;
  --b-badge-sample-text: #64748b;

  --b-radius-sm: 6px;
  --b-radius-md: 10px;
  --b-radius-lg: 14px;
  --b-radius-pill: 9999px;

  --b-shadow-sm: 0 1px 3px rgba(18, 52, 82, 0.04);
  --b-shadow-md: 0 5px 22px #23468b09;
  --b-shadow-hover: 0 9px 26px #23468b13;
}

/* 容器与页面全局设定 */
.b-catalog-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 8px 16px 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 面包屑导航 */
.b-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--b-text-muted);
  padding: 4px 0;
}
.b-breadcrumb a {
  color: var(--b-text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}
.b-breadcrumb a:hover {
  color: var(--b-primary);
}
.b-breadcrumb .sep {
  color: var(--b-text-sub);
  user-select: none;
}
.b-breadcrumb [aria-current='page'] {
  color: var(--b-dark);
  font-weight: 500;
}

/* 顶部 Banner 区域 */
.b-catalog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 0 8px;
  position: relative;
}
.b-catalog-header-main {
  flex: 1;
  min-width: 0;
}
.b-catalog-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.b-catalog-title-row h1 {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 28px;
  font-weight: 750;
  color: var(--b-dark-title);
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.25;
}
.b-badge-hint {
  font-size: 12px;
  font-weight: 500;
  background: var(--b-badge-blue-bg);
  color: var(--b-badge-blue-text);
  border: 1px solid #bae6fd;
  border-radius: var(--b-radius-sm);
  padding: 3px 10px;
  white-space: nowrap;
}
.b-catalog-subtitle {
  font-size: 14px;
  color: var(--b-text-muted);
  margin: 8px 0 0;
  line-height: 1.5;
}

/* 顶部右侧生动装饰图形与标语 */
.b-catalog-header-aside {
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  min-width: 200px;
  height: 64px;
  background: linear-gradient(135deg, rgba(224, 242, 254, 0.45) 0%, rgba(204, 251, 241, 0.25) 100%);
  border-radius: 12px;
  padding: 10px 18px;
  border: 1px solid rgba(186, 230, 253, 0.5);
  overflow: hidden;
}
.b-banner-quote {
  display: flex;
  flex-direction: column;
  z-index: 1;
}
.b-quote-title {
  font-size: 12px;
  color: var(--b-text-muted);
  line-height: 1.3;
}
.b-quote-sub {
  font-size: 13px;
  font-weight: 600;
  color: var(--b-primary);
  line-height: 1.4;
}
.b-quote-bar {
  display: block;
  width: 24px;
  height: 2.5px;
  background: var(--b-primary);
  border-radius: 2px;
  margin-top: 4px;
}
.b-banner-lines {
  position: absolute;
  right: -10px;
  top: -10px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 8px solid rgba(8, 131, 149, 0.08);
  pointer-events: none;
}

/* 离线契约提示条 */
.b-contract-alert {
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  border-radius: var(--b-radius-md);
  padding: 12px 16px;
}
.b-alert-inner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.b-alert-icon {
  color: var(--b-primary);
  flex-shrink: 0;
  margin-top: 2px;
}
.b-alert-text strong {
  display: block;
  font-size: 13px;
  color: #0f766e;
  margin-bottom: 2px;
}
.b-alert-text span {
  font-size: 12px;
  color: #115e59;
  line-height: 1.5;
}

/* 筛选与搜索卡片 */
.b-filter-card {
  background: var(--b-bg-card);
  border: 1px solid var(--b-border);
  border-radius: var(--b-radius-lg);
  padding: 18px 22px;
  box-shadow: var(--b-shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 搜索行 */
.b-search-row {
  width: 100%;
}
.b-search-box {
  display: flex;
  align-items: center;
  position: relative;
  background: #ffffff;
  border: 1px solid #cbe0ee;
  border-radius: var(--b-radius-md);
  padding: 0 14px;
  height: 44px;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}
.b-search-box:focus-within {
  border-color: var(--b-primary);
  box-shadow: 0 0 0 3px rgba(8, 131, 149, 0.12);
}
.b-search-icon {
  display: flex;
  align-items: center;
  color: var(--b-text-sub);
  margin-right: 10px;
}
.b-search-box input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  color: var(--b-text-main);
  background: transparent;
  width: 100%;
}
.b-search-box input::placeholder {
  color: #94a3b8;
}
.b-search-clear {
  background: none;
  border: none;
  font-size: 18px;
  color: #94a3b8;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.b-search-clear:hover {
  color: var(--b-text-main);
}

/* 筛选维度栅格 */
.b-filters-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.b-filter-group {
  display: flex;
  align-items: center;
  gap: 12px;
}
.b-filter-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--b-dark);
  white-space: nowrap;
}

/* 能力方向药丸按钮组 */
.b-direction-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.b-pill-btn {
  border: 1px solid #d8e6f1;
  background: #f8fcff;
  color: #334155;
  font-size: 13px;
  padding: 5px 14px;
  border-radius: var(--b-radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.4;
}
.b-pill-btn:hover {
  border-color: var(--b-primary);
  color: var(--b-primary);
  background: #ffffff;
}
.b-pill-btn.active {
  background: var(--b-primary);
  color: #ffffff;
  border-color: var(--b-primary);
  font-weight: 500;
  box-shadow: 0 2px 6px rgba(8, 131, 149, 0.2);
}

/* 更多方向下拉容器 */
.b-pills-more {
  position: relative;
  display: inline-block;
}
.b-pills-more summary {
  list-style: none;
}
.b-pills-more summary::-webkit-details-marker {
  display: none;
}
.b-pills-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
  background: #ffffff;
  border: 1px solid var(--b-border);
  border-radius: var(--b-radius-md);
  box-shadow: var(--b-shadow-md);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 20;
  min-width: 110px;
}
.b-dropdown-item {
  border: none;
  background: none;
  padding: 6px 12px;
  font-size: 13px;
  color: #334155;
  text-align: left;
  border-radius: var(--b-radius-sm);
  cursor: pointer;
  width: 100%;
}
.b-dropdown-item:hover {
  background: var(--b-primary-light);
  color: var(--b-primary);
}
.b-dropdown-item.active {
  background: var(--b-primary);
  color: #ffffff;
}

/* 行业与更多下拉项 */
.b-filter-selects {
  margin-left: auto;
  gap: 16px;
}
.b-select-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}
.b-select-wrapper select,
.b-more-popover select {
  height: 34px;
  padding: 0 30px 0 10px;
  border: 1px solid #cbe0ee;
  border-radius: var(--b-radius-sm);
  background: #f8fcff;
  color: #334155;
  font-size: 13px;
  cursor: pointer;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 14px;
}
.b-select-wrapper select:focus,
.b-more-popover select:focus {
  border-color: var(--b-primary);
  background-color: #ffffff;
}

/* 更多条件弹出菜单 */
.b-more-filter {
  position: relative;
}
.b-more-summary {
  font-size: 13px;
  font-weight: 500;
  color: var(--b-text-muted);
  cursor: pointer;
  padding: 6px 10px;
  border-radius: var(--b-radius-sm);
  user-select: none;
  list-style: none;
}
.b-more-summary::-webkit-details-marker {
  display: none;
}
.b-more-summary:hover {
  color: var(--b-primary);
}
.b-more-summary .arrow {
  font-size: 10px;
  margin-left: 2px;
}
.b-more-popover {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 6px;
  background: #ffffff;
  border: 1px solid var(--b-border);
  border-radius: var(--b-radius-md);
  box-shadow: var(--b-shadow-md);
  padding: 14px;
  z-index: 25;
  min-width: 220px;
}
.b-popover-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--b-text-muted);
}

/* 结果状态栏 */
.b-result-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 0;
  flex-wrap: wrap;
}
.b-result-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.b-current-scope {
  font-size: 13px;
  color: var(--b-text-muted);
}
.b-current-scope strong {
  color: var(--b-dark);
}
.b-active-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.b-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  background: var(--b-primary-light);
  color: var(--b-primary);
  border: 1px solid var(--b-primary-border);
  padding: 2px 8px;
  border-radius: var(--b-radius-pill);
}
.b-chip button {
  border: none;
  background: none;
  color: var(--b-primary);
  font-size: 14px;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}
.b-btn-clear {
  border: none;
  background: none;
  color: var(--b-primary);
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
  padding: 2px 4px;
}
.b-btn-clear:hover {
  color: var(--b-primary-hover);
}
.b-result-right {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}
.b-result-count {
  font-size: 13px;
  color: var(--b-text-muted);
}
.b-sort-wrapper select {
  height: 32px;
  padding: 0 28px 0 10px;
  border: 1px solid #cbe0ee;
  border-radius: var(--b-radius-sm);
  background: #ffffff;
  color: #334155;
  font-size: 13px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 14px;
}

/* 认证项目卡片列表 */
.b-program-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 单个认证项目卡片 (严格还原04_认证项目筛选页.png) */
.b-program-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) 140px;
  align-items: center;
  gap: 24px;
  background: var(--b-bg-card);
  border: 1px solid var(--b-border);
  border-radius: var(--b-radius-lg);
  padding: 20px 24px;
  box-shadow: var(--b-shadow-sm);
  transition:
    transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.b-program-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--b-shadow-hover);
  border-color: #c7dfea;
}

/* 卡片左侧 3D 拟物图示 */
.b-card-visual {
  width: 180px;
  height: 135px;
  border-radius: var(--b-radius-md);
  background: linear-gradient(135deg, #e0f2fe 0%, #dbeafe 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(186, 230, 253, 0.6);
  flex-shrink: 0;
}
.b-card-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.b-program-card:hover .b-card-visual img {
  transform: scale(1.03);
}

/* 卡片中间信息 */
.b-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

/* 标题与徽章行 */
.b-card-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.b-card-title {
  font-size: 20px;
  font-weight: 750;
  color: var(--b-dark-title);
  margin: 0;
  line-height: 1.25;
}
.b-code-pill {
  font-size: 11px;
  font-weight: 600;
  background: var(--b-badge-blue-bg);
  color: var(--b-badge-blue-text);
  border: 1px solid #bae6fd;
  border-radius: 4px;
  padding: 2px 8px;
}
.b-kind-pill {
  font-size: 11px;
  font-weight: 600;
  background: var(--b-badge-teal-bg);
  color: var(--b-badge-teal-text);
  border: 1px solid #99f6e4;
  border-radius: 4px;
  padding: 2px 8px;
}
.b-sample-pill {
  font-size: 11px;
  font-weight: 500;
  background: var(--b-badge-sample-bg);
  color: var(--b-badge-sample-text);
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 2px 8px;
}

/* 能力目标行 */
.b-goal-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 2px 0;
  flex-wrap: wrap;
}
.b-goal-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--b-text-muted);
}
.b-target-icon {
  color: var(--b-primary);
  font-size: 16px;
  line-height: 1;
}
.b-goal-text {
  font-size: 15px;
  font-weight: 700;
  color: var(--b-text-main);
}

/* 核心能力步骤胶囊行 */
.b-steps-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 2px 0 6px;
}
.b-step-pill {
  font-size: 12px;
  color: #334155;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 3px 10px;
  line-height: 1.3;
}

/* 三列元数据区块 */
.b-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding-top: 10px;
  border-top: 1px dashed #e8f0f6;
}
.b-meta-col {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.b-meta-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--b-text-muted);
}
.b-meta-icon {
  display: flex;
  align-items: center;
  color: #64748b;
}
.b-meta-icon .icon {
  width: 14px;
  height: 14px;
}
.b-meta-val {
  font-size: 12px;
  color: #334155;
  margin: 0;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 卡片右侧动作区 */
.b-card-action {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
}
.b-primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--b-primary);
  color: #ffffff !important;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--b-radius-md);
  text-decoration: none;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 6px rgba(8, 131, 149, 0.2);
  transition: all 0.15s ease;
  white-space: nowrap;
}
.b-primary-btn:hover {
  background: var(--b-primary-hover);
  box-shadow: 0 4px 12px rgba(8, 131, 149, 0.3);
  transform: translateY(-1px);
}
.b-primary-btn:active {
  background: var(--b-primary-active);
  transform: translateY(0);
}

/* 分页控制栏 */
.b-pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 4px 0;
  flex-wrap: wrap;
}
.b-page-left {
  font-size: 13px;
  color: var(--b-text-muted);
}
.b-page-navs {
  display: flex;
  align-items: center;
  gap: 6px;
}
.b-page-btn {
  min-width: 34px;
  height: 34px;
  padding: 0 6px;
  border: 1px solid var(--b-border);
  background: #ffffff;
  color: #334155;
  font-size: 13px;
  border-radius: var(--b-radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.b-page-btn:hover:not(:disabled) {
  border-color: var(--b-primary);
  color: var(--b-primary);
}
.b-page-btn.active {
  background: var(--b-primary);
  color: #ffffff;
  border-color: var(--b-primary);
  font-weight: 600;
}
.b-page-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: #f8fafc;
}
.b-page-arrow {
  padding: 0 12px;
}
.b-page-dots {
  color: #94a3b8;
  padding: 0 4px;
}
.b-page-right select {
  height: 34px;
  padding: 0 28px 0 10px;
  border: 1px solid #cbe0ee;
  border-radius: var(--b-radius-sm);
  background: #ffffff;
  color: #334155;
  font-size: 13px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 14px;
}

/* 页脚声明 */
.b-catalog-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 4px 12px;
  border-top: 1px solid var(--b-border-subtle);
  font-size: 12px;
  color: var(--b-text-sub);
  flex-wrap: wrap;
}

/* 空状态与骨架屏 */
.b-empty-panel {
  background: #ffffff;
  border: 1px solid var(--b-border);
  border-radius: var(--b-radius-lg);
  padding: 48px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.b-empty-icon {
  color: #94a3b8;
  font-size: 36px;
}
.b-empty-panel h3 {
  font-size: 16px;
  color: var(--b-dark);
  margin: 0;
}
.b-empty-panel p {
  font-size: 13px;
  color: var(--b-text-muted);
  margin: 0;
}
.b-loading-skeleton {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.b-skeleton-card {
  height: 175px;
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: b-shimmer 1.5s infinite;
  border-radius: var(--b-radius-lg);
  border: 1px solid var(--b-border);
}
@keyframes b-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ==========================================================================
   左下角姓名/登录独立入口与导航侧栏 (与右上角同步)
   ========================================================================== */
.sidebar-account {
  margin-top: auto;
  padding: 16px 20px;
  border-top: 1px solid #e1edf5;
  background: rgba(244, 249, 253, 0.7);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sidebar-account-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--b-dark-title);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: var(--b-radius-sm);
  background: #ffffff;
  border: 1px solid #cbe0ee;
  transition: all 0.15s ease;
}
.sidebar-account-btn:hover {
  background: var(--b-primary-light);
  color: var(--b-primary);
  border-color: var(--b-primary);
}
.sidebar-account-sub {
  font-size: 11px;
  color: var(--b-text-sub);
  line-height: 1.4;
  margin: 2px 0 0;
}
.sidebar-accent-bar {
  width: 28px;
  height: 3px;
  background: var(--b-primary);
  border-radius: 2px;
  margin-top: 2px;
}
.sidebar-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-user-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.sidebar-user-name {
  font-size: 13px;
  color: var(--b-dark-title);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user-role {
  font-size: 11px;
  color: var(--b-primary);
  font-weight: 500;
}
.sidebar-user-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.sidebar-user-actions a,
.sidebar-user-actions button {
  font-size: 11px;
  color: var(--b-text-muted);
  text-decoration: none;
  border: none;
  background: none;
  cursor: pointer;
  padding: 2px 3px;
  /* Chinese labels must wrap between items, never inside a label. */
  white-space: nowrap;
  flex: 0 0 auto;
}
.sidebar-user-actions a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.sidebar-user-actions a:hover,
.sidebar-user-actions button:hover {
  color: var(--b-primary);
}

/* ==========================================================================
   多端适配与响应式断点 (桌面、平板横竖屏、手机)
   ========================================================================== */

/* 平板横屏与窄桌面 (1024px 以下) */
@media (max-width: 1024px) {
  .b-catalog-header-aside {
    display: none;
  }
  .b-program-card {
    grid-template-columns: 160px minmax(0, 1fr) 120px;
    gap: 18px;
    padding: 18px 20px;
  }
  .b-card-visual {
    width: 160px;
    height: 120px;
  }
  .b-card-title {
    font-size: 18px;
  }
  .b-meta-grid {
    gap: 12px;
  }
}

/* 平板竖屏 (768px 以下) */
@media (max-width: 768px) {
  .b-catalog-container {
    padding: 6px 12px 32px;
  }
  .b-catalog-title-row h1 {
    font-size: 22px;
  }
  .b-filters-grid {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .b-filter-selects {
    margin-left: 0;
    width: 100%;
    justify-content: space-between;
  }
  .b-program-card {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px;
  }
  .b-card-visual {
    width: 100%;
    height: 160px;
  }
  .b-meta-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .b-card-action {
    justify-content: stretch;
  }
  .b-primary-btn {
    width: 100%;
  }
  .b-pagination-bar {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }
}

/* 手机竖屏 (480px 以下) */
@media (max-width: 480px) {
  .b-catalog-title-row h1 {
    font-size: 20px;
  }
  .b-badge-hint {
    font-size: 11px;
    padding: 2px 6px;
  }
  .b-direction-pills {
    width: 100%;
  }
  .b-pill-btn {
    font-size: 12px;
    padding: 4px 10px;
  }
  .b-result-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .b-result-right {
    width: 100%;
    justify-content: space-between;
    margin-left: 0;
  }
}

/* Audience is an authored text filter, so keep its search control consistent
   with the B-scheme selects without changing other forms. */
.b-popover-field input {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--b-border);
  border-radius: var(--b-radius-sm);
  background: var(--b-bg-input);
  color: var(--b-text-main);
  font: inherit;
}
.b-popover-field input:focus-visible {
  outline: 2px solid var(--b-primary);
  outline-offset: 2px;
}
