/* =========================================================
   🏢 POLICY LAYOUT MODULE
   ========================================================= */

/* =========================================================
   1️⃣ 首页巨幅 Banner 
   ========================================================= */
.pba-home-banner {
  background: var(--banner-bg);
  color: var(--banner-input-color);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: 110% 110%;
}

.pba-home-banner .container {
  position: relative;
  z-index: 3;
}

/* 仅针对 light 主题的 Banner 添加渐变流动和底部羽化过渡 */
[data-theme='light'] .pba-home-banner {
  animation: banner-gradient-flow 8s ease infinite;
}

@keyframes banner-gradient-flow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}
[data-theme='light'] .pba-home-banner {
  background: transparent; /* 父元素自身背景设为透明 */
}

[data-theme='light'] .pba-home-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0; /* 放到最底层 */
  background: var(--banner-bg);
  background-size: 110% 110%; /* 保持动画放大比例 */

  /* 把动画转移到这里 */
  animation: banner-gradient-flow 8s ease infinite;

  /* 魔法遮罩加在这里，只羽化背景层 */
  -webkit-mask-image: linear-gradient(to bottom, #000 80%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 80%, transparent 100%);
}

/* 确保所有内容在背景层之上；z-index 需高于 pba-detail-toolbar(100) 使 suggest 框不被遮挡 */
.pba-home-banner .container,
.pba-home-banner .cyber-beam {
  position: relative;
  z-index: 200;
}

/* 特别确保搜索面板的层级最高 */
.pba-search-glass-panel {
  position: relative;
  z-index: 10;
}
/* --- ✨ 星光与光束动效 --- */
[data-theme='dark'] .pba-home-banner::before,
[data-theme='blue'] .pba-home-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    radial-gradient(
      1px 1px at 20% 30%,
      rgba(255, 255, 255, 0.18) 100%,
      transparent
    ),
    radial-gradient(
      1px 1px at 70% 15%,
      rgba(255, 255, 255, 0.55) 100%,
      transparent
    ),
    radial-gradient(
      1.5008px 1.5008px at 85% 65%,
      rgba(255, 255, 255, 0.33) 100%,
      transparent
    );
  background-size: 18.75rem 18.75rem;
  animation: twinkle-slow 6s ease-in-out infinite alternate;
}

[data-theme='light'] .pba-home-banner::after,
[data-theme='dark'] .pba-home-banner::after,
[data-theme='blue'] .pba-home-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    radial-gradient(
      1.5008px 1.5008px at 40% 50%,
      rgba(255, 255, 255, 0.33) 100%,
      transparent
    ),
    radial-gradient(
      1px 1px at 15% 85%,
      rgba(255, 255, 255, 0.78) 100%,
      transparent
    ),
    radial-gradient(
      1px 1px at 90% 20%,
      rgba(255, 255, 255, 0.18) 100%,
      transparent
    );
  background-size: 21.875rem 21.875rem;
  animation: twinkle-fast 4s ease-in-out infinite alternate;
}

@keyframes twinkle-slow {
  0% {
    opacity: 0.2;
    transform: scale(0.95);
  }
  100% {
    opacity: 0.8;
    transform: scale(1);
  }
}
@keyframes twinkle-fast {
  0% {
    opacity: 0.05;
  }
  100% {
    opacity: 0.6;
  }
}

.cyber-beam {
  position: absolute;
  left: -20%;
  top: -20%;
  width: 50%;
  height: 140%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.12),
    transparent
  );
  transform: rotate(18deg);
  animation: beamSweep 6s linear infinite;
  pointer-events: none;
  z-index: 2;
}
@keyframes beamSweep {
  0% {
    transform: translateX(-200%) rotate(18deg);
  }
  100% {
    transform: translateX(400%) rotate(18deg);
  }
}

:root[data-theme='light'] .cyber-beam {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  mix-blend-mode: overlay;
}

/* ☁️ 云彩/气泡动效 */
.floating-decorations {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 2;
}
.float-item {
  position: absolute;
  opacity: 0.6;
  filter: blur(8px);
  will-change: transform, opacity;
}
.bubble-1 {
  height: 56%;
  left: 0;
  top: 0;
  animation: float-breathing 10s ease-in-out infinite alternate;
}
.bubble-2 {
  height: 36%;
  bottom: 0;
  right: 0;
  animation: float-drifting 15s ease-in-out infinite alternate;
}
@keyframes float-breathing {
  0% {
    transform: translateY(0px) scale(0.95);
    opacity: 1;
  }
  100% {
    transform: translateY(50%) scale(1.05);
    opacity: 1;
  }
}
@keyframes float-drifting {
  0% {
    transform: translate(0px, 0px) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translate(-200%, -196%) rotate(15deg);
    opacity: 1;
  }
}
[data-theme='dark'] .float-item,
[data-theme='blue'] .float-item {
  opacity: 0.3 !important;
  mix-blend-mode: screen;
}

/* =========================================================
   💡 Banner 内部业务组件 (完美利用组件代币，彻底解决硬编码)
   ========================================================= */

.banner-content-wrapper {
  position: relative;
  z-index: 5;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* --- 1. 顶部 Toolbar --- */
.pba-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0;
  padding: var(--space-md) 0;
  font-size: var(--font-size-base);
}
.pba-toolbar a {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: inherit;
  opacity: 0.9;
  transition: opacity var(--duration-fast);
}
.pba-toolbar a:hover {
  opacity: 1;
}
.pba-toolbar img {
  height: 1.25em;
}
.toolbar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  margin: 0;
}
.nav-trigger-icon {
  width: 16px;
  height: 16px;
  vertical-align: -3px;
  margin-right: 4px;
  flex-shrink: 0;
}
.nav-trigger-icon-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-right: 4px;
  border-radius: 50%;
  border: 1px solid currentColor;
}
.nav-trigger-icon-circle .nav-trigger-icon {
  margin-right: 0;
  vertical-align: middle;
}
.nav-dropdown-wrapper {
  position: relative;
}
.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 8.75rem;
  background: var(--color-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: var(--space-xs) 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--duration-fast);
  z-index: 99;
}
@media (min-width: 769px) {
  .nav-dropdown-wrapper:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
}
.nav-dropdown-menu a {
  /* padding: var(--space-sm) var(--space-md); */
  color: var(--color-text);
  display: block;
}
.nav-dropdown-menu a:hover {
  background: var(--color-tag-bg);
  color: var(--color-primary);
}
.region-nav-menu {
  min-width: 420px;
  max-width: min(90vw, 640px);
  padding: 0;
}
.lang-switch i {
  cursor: pointer;
  font-style: normal;
  opacity: 0.7;
  transition: all var(--duration-fast);
}
.lang-switch i:hover {
  opacity: 1;
}
.lang-switch i.active {
  color: var(--color-primary-text);
  background: var(--color-primary);
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  opacity: 1;
}

/* --- 2. Logo 区域 --- */
.pba-logo {
  text-align: center;
  margin-top: 4vh;
  margin-bottom: 3vh;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: var(--space-sm);
}
.pba-logo h1 {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.125rem;
  color: inherit;
}
.version-tag {
  background: linear-gradient(135deg, var(--color-warning), #ff6b6b);
  color: #fff;
  font-size: var(--font-size-xs);
  padding: 0.125rem 0.5rem;
  border-radius: 6.1875rem;
  font-weight: bold;
  transform: translateY(-0.5rem);
  text-shadow: none;
  box-shadow: var(--shadow-sm);
}

/* --- 3. 搜索区域毛玻璃面板 --- */
.pba-search-glass-panel {
  max-width: 72%;
  margin: 2rem auto 6rem;
  width: 100%;
  background: var(--glass-bg);
  border: 0.0625rem solid var(--glass-border);
  box-shadow:
    0 0.625rem 2.5rem rgba(0, 0, 0, 0.15),
    inset 0 0.0625rem 0.0625rem rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(1.25rem);
  -webkit-backdrop-filter: blur(1.25rem);
  padding: var(--space-xl);
  border-radius: calc(var(--radius-md) * 2);
  transition:
    transform var(--duration-fast),
    box-shadow var(--duration-fast);
}

.pba-search-glass-panel:hover {
  transform: translateY(-2px);
  box-shadow:
    0 15px 45px rgba(0, 0, 0, 0.2),
    inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

/* 🌟 Tab 切换 */
.pba-search-type {
  display: flex;
  gap: var(--space-lg);
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-lg) 0;
  justify-content: center;
  color: var(--pba-tab-text);
}
.pba-search-type li {
  cursor: pointer;
  padding: 0.375rem 1.5rem;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  border-radius: 6rem;
  background: var(--pba-tab-bg);
  border: 1px solid transparent;
  transition: all var(--duration-fast);
}
.pba-search-type li:hover {
  background: var(--pba-tab-bg-hover);
  transform: scale(1.02);
}
.pba-search-type li.active {
  background: var(--pba-tab-active-bg, var(--color-primary));
  color: var(--color-primary-text);
  border-color: transparent;
  text-shadow: none;
}

/* 🌟 搜索框与一键清除 (结构重构：彻底修复样式变形) */
.search-flex {
  display: flex;
  height: 3.5rem;
  position: relative;
  gap: 0.5rem; /* 使得输入框区域和右侧按钮之间有固定间距 */
}

/* 输入框和清除按钮的共同包裹层 */
.input-wrapper {
  flex: 1;
  position: relative;
  height: 100%;
}

.policy-input {
  width: 100%;
  height: 100%;
  /* 右侧 padding 必须大，给清除按钮留出绝对定位的空间 */
  padding: 0 45px 0 var(--space-lg);
  font-size: var(--font-size-base);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  color: var(--banner-input-color);
  outline: none;
  transition: all var(--duration-fast);
}
.policy-input::placeholder {
  color: var(--pba-tab-text);
  opacity: 0.7;
}
.policy-input:focus {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px
    color-mix(in srgb, var(--color-primary) 30%, transparent);
}

/* 清除按钮被严格限制在 input-wrapper 内部右侧 */
.clear-btn {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--pba-tab-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
  border-radius: 50%;
  background: transparent;
  opacity: 0;
  visibility: hidden;
  transition: all var(--duration-fast);
  z-index: 5;
}
.clear-btn:hover {
  color: var(--banner-text-color);
  background: rgba(255, 255, 255, 0.15);
}
/* 注意：这里的控制类加在了 input-wrapper 上，必须和 JS 代码相匹配 */
.input-wrapper.has-value .clear-btn {
  opacity: 1;
  visibility: visible;
}

/* 独立的检索按钮 */
.search-btn {
  height: 100%;
  padding: 0 var(--space-xl);
  border: none;
  background: var(--color-primary);
  color: var(--color-primary-text);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-medium);
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all var(--duration-fast);
  box-shadow: var(--shadow-sm);
}
.search-btn:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* 智能提示框 */
.search-suggest-box {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  right: 0;
  background: var(--color-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
  z-index: 110;
  color: var(--color-text);
  text-shadow: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  min-height: 0;
  padding-bottom: 0.5rem;
}
.search-suggest-box.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* 左栏：搜索发现 */
.suggest-panel-left {
  flex: 1 1 55%;
  min-width: 0;
  border-right: 1px solid var(--color-tag-bg);
}
/* 右栏：搜索历史 */
.suggest-panel-right {
  flex: 1 1 45%;
  min-width: 0;
}

.suggest-header {
  padding: 0.625rem 1rem;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-secondary);
  border-bottom: 1px solid var(--color-tag-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.suggest-clear-btn {
  display: flex;
  align-items: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-secondary);
  padding: 0.125rem 0.25rem;
  border-radius: var(--radius-sm);
  transition:
    color var(--duration-fast),
    background var(--duration-fast);
}
.suggest-clear-btn:hover {
  color: var(--color-danger, #e53e3e);
  background: var(--color-tag-bg);
}
.suggest-clear-btn svg {
  display: block;
}

.suggest-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.suggest-list li {
  padding: 0.6rem 1rem;
  cursor: pointer;
  font-size: var(--font-size-sm);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: background var(--duration-fast);
  /* white-space: nowrap; */
  overflow: hidden;
  text-overflow: ellipsis;
  width: 96%;
}
.suggest-list li:hover {
  background: var(--color-tag-bg);
  color: var(--color-primary);
}
/* 搜索发现（左栏）条目前缀 */
.suggest-panel-left .suggest-list li::before {
  content: '✦';
  font-size: 0.75em;
  color: var(--color-primary);
  opacity: 0.7;
  flex-shrink: 0;
}
/* 搜索历史（右栏）条目前缀 */
.suggest-panel-right .suggest-list li::before {
  content: '';
  display: block;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpolyline points='12 6 12 12 16 14'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
}
.suggest-empty {
  padding: 1.5rem 1rem;
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
  text-align: center;
  opacity: 0.6;
}

/* skeleton 占位 */
.suggest-skeleton {
  padding: 0.5rem 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.suggest-skeleton-line {
  height: 0.875rem;
  border-radius: 0.375rem;
  background: linear-gradient(
    90deg,
    var(--color-tag-bg) 25%,
    var(--border-color) 50%,
    var(--color-tag-bg) 75%
  );
  background-size: 200% 100%;
  animation: suggest-shimmer 1.2s infinite;
}
.suggest-skeleton-line:nth-child(1) {
  width: 80%;
}
.suggest-skeleton-line:nth-child(2) {
  width: 65%;
}
.suggest-skeleton-line:nth-child(3) {
  width: 72%;
}
@keyframes suggest-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* --- 4. 热搜推荐 --- */
.pba-search-recomend {
  display: flex;
  align-items: center;
  margin: var(--space-lg) 0 0 0;
  font-size: var(--font-size-sm);
  color: var(--pba-hot-text);
}
.pba-search-recomend dt {
  opacity: 0.8;
  margin-right: var(--space-sm);
  font-weight: var(--font-weight-medium);
}
.pba-search-recomend dd {
  margin: 0;
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}
.pba-search-recomend a {
  background: var(--pba-hot-link-bg);
  padding: 0.25rem 0.875rem;
  border-radius: 6.1875rem;
  transition: all var(--duration-fast);
  color: inherit;
  text-decoration: none;
  border: 1px solid transparent;
}
.pba-search-recomend a:hover {
  background: var(--glass-bg);
  color: var(--banner-text-color);
  border-color: var(--glass-border);
  text-shadow: none;
  transform: translateY(-1px);
}

/* =========================================================
   2️⃣ 主题切换器悬浮菜单
   ========================================================= */
.theme-switcher {
  position: fixed;
  top: 1.5rem;
  right: 1rem;
  z-index: var(--z-modal);
}
.theme-toggle-btn {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: 0.0625rem solid var(--border-color);
  background: var(--color-card);
  color: var(--color-text-secondary);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration-fast) var(--ease-base);
}
.theme-toggle-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  transform: translateY(-0.125rem);
}
.theme-toggle-btn svg {
  width: 1.5rem;
  height: 1.5rem;
  transition: transform var(--duration-fast) var(--ease-base);
}
.theme-switcher.active .theme-toggle-btn svg {
  transform: rotate(90deg);
}
.theme-menu {
  position: absolute;
  top: calc(100% + var(--space-sm));
  right: 0;
  width: 9.375rem;
  background: var(--color-card);
  border: 0.0625rem solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: var(--space-sm);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  opacity: 0;
  visibility: hidden;
  transform: translateY(0.625rem);
  transition: all var(--duration-fast) var(--ease-base);
}
.theme-switcher.active .theme-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.theme-option {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  border: none;
  background: transparent;
  color: var(--color-text);
  font-size: var(--font-size-sm);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  gap: var(--space-md);
  transition: background-color var(--duration-fast) var(--ease-base);
}
.theme-option:hover {
  background: var(--color-tag-bg);
}
.theme-option-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
}
.theme-option.current {
  background-color: var(--color-primary);
  color: var(--color-primary-text);
  font-weight: var(--font-weight-medium);
}
/* =========================================================
   📊 热门专题与标签云 (Topic & Tag Cloud)
   ========================================================= */

.pba-home-topicloud-wrap {
  /* 🌟 1. 利用组件代币，取代写死的 #fff，实现全主题自适应毛玻璃 */
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.05),
    inset 0 1px 1px rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius-md);
  margin-top: -3rem;
  position: relative;
  z-index: 10;
  padding-inline: var(--container-padding);
}

/* 主体布局：7:3 黄金分割 */
.pba-home-topicloud {
  display: grid;
  /* 🌟 2. 核心修复：使用 minmax(0, Xfr) 防止内部内容撑破容器宽度 */
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr);
  gap: 0;
  padding: var(--space-xl) 0; /* 四周增加 padding */
  margin: 0;
}

.pba-home-topicloud.is-topic-only {
  grid-template-columns: minmax(0, 1fr);
}

.pba-home-topicloud.is-topic-only > dt {
  border-right: 0;
  padding-right: 0;
}

/* 左右分割线 */
.pba-home-topicloud > dt {
  border-right: 0.0625rem solid var(--border-color);
  padding-right: 3rem;
}
/* .pba-home-topicloud > dd {
  padding-left: 1rem;
} */

/* 标题样式 */
.pba-home-tpcld-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
}
.pba-home-tpcld-title > span {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text); /* 自动跟随主题字体颜色 */
}
.pba-home-tpcld-title > span svg {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--color-primary);
}
.pba-home-tpcld-title a {
  font-size: var(--font-size-sm);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 0.25rem;
  text-decoration: none;
}
.pba-home-tpcld-title a i::after {
  content: '›';
  font-style: normal;
  font-family: monospace;
  font-size: 1.2em;
}

/* --- 专题卡片区域 (全权交给 Swiper) --- */
.pba-home-tpcld-swiper {
  width: 100%;
  overflow: hidden;
  padding: 10px 0;
}

.pba-home-tpcld-swiper .swiper-wrapper {
  display: flex;
}

.pba-home-tpcld-slide {
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  height: 100%;
  margin: 0;
  transition:
    transform var(--duration-fast),
    box-shadow var(--duration-fast);
  cursor: pointer;
  box-sizing: border-box;
}
.pba-home-tpcld-slide:hover {
  transform: translateY(-0.25rem);
  box-shadow: var(--shadow-md);
}

/* 导航按钮组 */
.swiper-nav-group {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}
.swiper-nav-prev,
.swiper-nav-next {
  background: var(--pba-tab-bg);
  border: none;
  color: var(--pba-tab-text);
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--duration-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}
.swiper-nav-prev:hover,
.swiper-nav-next:hover {
  background: var(--color-primary);
  color: var(--color-primary-text);
}

/* 卡片内部图标 */
.pba-home-tpcld-slide dt {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-lg);
}
.pba-home-tpcld-slide dt svg {
  width: 1.5rem;
  height: 1.5rem;
}

/* 卡片文字 */
.pba-home-tpcld-slide dd {
  margin: 0;
}
.pba-home-tpcld-slide dd a {
  display: block;
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-bold);
  color: var(--color-text); /* 自动跟随主题字体颜色 */
  margin-bottom: var(--space-sm);
  text-decoration: none;
}
.pba-home-tpcld-slide dd p {
  margin: 0;
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
  line-height: 1.6;
}

/* 🎨 移除原有的 :nth-child 分配，改用精准的类名分配，这样 Swiper 循环时颜色才不会乱 */
.swiper-slide:nth-child(5n + 1) .pba-home-tpcld-slide {
  background: var(--tint-blue-bg);
}
.swiper-slide:nth-child(5n + 1) .pba-home-tpcld-slide dt {
  background: color-mix(in srgb, var(--tint-blue-text) 15%, transparent);
  color: var(--tint-blue-text);
}

.swiper-slide:nth-child(5n + 2) .pba-home-tpcld-slide {
  background: var(--tint-green-bg);
}
.swiper-slide:nth-child(5n + 2) .pba-home-tpcld-slide dt {
  background: color-mix(in srgb, var(--tint-green-text) 15%, transparent);
  color: var(--tint-green-text);
}

.swiper-slide:nth-child(5n + 3) .pba-home-tpcld-slide {
  background: var(--tint-orange-bg);
}
.swiper-slide:nth-child(5n + 3) .pba-home-tpcld-slide dt {
  background: color-mix(in srgb, var(--tint-orange-text) 15%, transparent);
  color: var(--tint-orange-text);
}

.swiper-slide:nth-child(5n + 4) .pba-home-tpcld-slide {
  background: var(--tint-purple-bg);
}
.swiper-slide:nth-child(5n + 4) .pba-home-tpcld-slide dt {
  background: color-mix(in srgb, var(--tint-purple-text) 15%, transparent);
  color: var(--tint-purple-text);
}

.swiper-slide:nth-child(5n + 5) .pba-home-tpcld-slide {
  background: var(--tint-gray-bg);
}
.swiper-slide:nth-child(5n + 5) .pba-home-tpcld-slide dt {
  background: color-mix(in srgb, var(--tint-gray-text) 15%, transparent);
  color: var(--tint-gray-text);
}
/* 1️⃣ 让 swiper-wrapper 拉齐高度 */
.pba-home-tpcld-swiper .swiper-wrapper {
  align-items: stretch; /* ⭐关键 */
}

/* 2️⃣ slide 自身高度统一 */
.pba-home-tpcld-swiper .swiper-slide {
  height: auto; /* 防止被 Swiper inline 样式干扰 */
  display: flex;
}

/* 3️⃣ 卡片强制撑满 */
.pba-home-tpcld-slide {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
}

/* 4️⃣ 文字区域自适应 + 对齐 */
.pba-home-tpcld-slide dd {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* 5️⃣ 标题固定高度（防抖动） */
.pba-home-tpcld-slide dd a {
  line-height: 1.4;
}

/* 6️⃣ 描述截断（防止撑高） */
.pba-home-tpcld-slide dd p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* 确保链路完整 */
.pba-home-topicloud > dd {
  height: 100%; /* dd 填满 grid 行高 */
  display: flex;
  flex-direction: column;
}

.pba-home-tpcld-tags {
  flex: 1; /* 标签云撑满 dd 剩余空间 */
  min-height: 0;
}
/* 标签云热度分级 */
.pba-home-tpcld-tags a {
  display: inline-block;
  margin: 0.25rem 0.3rem;
  padding: 0.25rem 0.75rem;
  border-radius: 2rem;
  text-decoration: none;
  transition:
    opacity 0.2s,
    transform 0.15s;
  line-height: 1.5;
}
.pba-home-tpcld-tags a:hover {
  opacity: 0.82;
  transform: translateY(-1px);
}
/* hot: 权重 ≥ 60% → 大字，强色 */
.pba-home-tpcld-tags .tag-level-hot {
  font-size: 1rem;
  font-weight: 600;
  background: color-mix(in srgb, var(--color-primary) 18%, transparent);
  color: var(--color-primary);
  border: 1px solid color-mix(in srgb, var(--color-primary) 40%, transparent);
}
/* warm: 权重 25-60% → 中字 */
.pba-home-tpcld-tags .tag-level-warm {
  font-size: 0.875rem;
  font-weight: 500;
  background: color-mix(in srgb, var(--color-primary) 10%, transparent);
  color: var(--color-text);
  border: 1px solid color-mix(in srgb, var(--color-primary) 20%, transparent);
}
/* cool: 权重 < 25% → 小字，浅色 */
.pba-home-tpcld-tags .tag-level-cool {
  font-size: 0.8125rem;
  font-weight: 400;
  background: var(--color-bg-subtle, rgba(0, 0, 0, 0.04));
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border, rgba(0, 0, 0, 0.08));
}

.pba-home-tpcld-tags .tag-cloud-empty {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
}
/* 骨架屏占位 */
.pba-home-tpcld-tags .tag-skeleton {
  width: 4rem;
  height: 1.75rem;
  border-radius: 2rem;
  background: var(--color-bg-subtle, rgba(0, 0, 0, 0.06));
  animation: skeleton-pulse 1.4s ease-in-out infinite;
}
@keyframes skeleton-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}
/* =========================================================
   🌟 为您推荐区块 (AI Recommend Section)
   ========================================================= */

.pba-recommend-section {
  margin-top: var(--space-xl);
  margin-bottom: var(--space-xl);
}

/* 头部标题区域 */
.pba-section-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  color: var(--color-text);
}
.pba-section-header svg {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--color-primary); /* 闪亮图标采用主题色 */
}
.pba-section-header h2 {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  margin: 0;
}
.rcmd-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  line-height: 1.6;
}
.rcmd-badge--personal {
  background: #e8f5e9;
  color: #2e7d32;
}
.rcmd-badge--hot {
  background: #fff3e0;
  color: #a63b00;
}

/* 强大的 CSS Grid 布局：PC 4列，自动均分 */
.pba-recommend-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}

/* 推荐卡片内部微调 (继承自基础的 .card) */
.pba-rcmd-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  padding: 1.25rem; /* 比基础卡片稍微紧凑一点 */
}
.pba-rcmd-card:hover {
  transform: translateY(-0.25rem); /* 悬浮微微上浮 */
}

/* 发文单位 (灰色小字 + 图标) */
.rcmd-header {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-sm);
}
.rcmd-header svg {
  width: 0.875rem;
  height: 0.875rem;
  opacity: 0.7;
}

/* 政策标题 (支持两行溢出省略) */
.rcmd-title {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  line-height: 1.5;
  margin: 0 0 var(--space-md) 0;

  /* Flex: 1 撑开中间空间，确保底部绝对对齐 */
  flex: 1;
  /* 两行省略号魔法 */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 底部：标签和日期对齐 */
.rcmd-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end; /* 底部对齐 */
  margin-top: auto; /* 始终推到底部 */
}

.rcmd-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}
.rcmd-date {
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
  white-space: nowrap;
}

/* --- 通用多彩标签 (基于 pbabase 中设定的 Tint Tokens) --- */
.tag-tint {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: 0.25rem;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
}
.tag-tint-blue {
  background: var(--tint-blue-bg);
  color: var(--tint-blue-text);
}
.tag-tint-green {
  background: var(--tint-green-bg);
  color: var(--tint-green-text);
}
.tag-tint-orange {
  background: var(--tint-orange-bg);
  color: var(--tint-orange-text);
}
.tag-tint-purple {
  background: var(--tint-purple-bg);
  color: var(--tint-purple-text);
}
.tag-tint-gray {
  background: var(--tint-gray-bg);
  color: var(--tint-gray-text);
}
/* =========================================================
   📊 政策聚合面板 (Policy Dashboard)
   ========================================================= */

.pba-policy-dashboard {
  margin-bottom: var(--space-xl);
  padding: 0; /* 移除基础 card 的 padding，重新精细控制 */
  overflow: hidden;
}

/* --- 头部：Tab 与 链接 --- */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: 0.0625rem solid var(--border-color);
  padding: 0 var(--space-xl);
  background: color-mix(
    in srgb,
    var(--color-tag-bg) 30%,
    transparent
  ); /* 头部带一点极其微弱的底色区分 */
}

.dashboard-tabs {
  display: flex;
  gap: var(--space-xl);
}
.dashboard-tabs span {
  padding: 20px 0 16px 0;
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
  cursor: pointer;
  position: relative;
  transition: color var(--duration-fast);
}
.dashboard-tabs span:hover {
  color: var(--color-text);
}
.dashboard-tabs span.active {
  color: var(--color-primary);
  font-weight: var(--font-weight-bold);
}
/* 底部高亮滑块 */
.dashboard-tabs span::after {
  content: '';
  position: absolute;
  bottom: -0.0625rem;
  left: 0;
  right: 0;
  height: 0.1875rem;
  border-radius: 3px 3px 0 0;
  background: var(--color-primary);
  opacity: 0;
  transform: scaleX(0.5);
  transition: all var(--duration-fast);
}
.dashboard-tabs span.active::after {
  opacity: 1;
  transform: scaleX(1);
}

.dashboard-global-more {
  padding-bottom: 1rem;
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  transition: color var(--duration-fast);
}
.dashboard-global-more:hover {
  color: var(--color-primary);
}
.dashboard-global-more i {
  font-style: normal;
  font-family: monospace;
  font-size: 1.2em;
}

/* --- 身体：三列 Grid 布局 --- */
.dashboard-body {
  display: grid;
  /* grid-template-columns: repeat(3, 1fr); */
  /* grid-template-columns: repeat(auto-fill, minmax(33.3%, 1fr)); */
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  padding: var(--space-xl);
}

.dashboard-col {
  padding: 0 var(--space-xl);
  /* 右边框分割线，最后一列不加 */
  border-right: 0.0625rem dashed var(--color-tag-bg);
}
.dashboard-col:first-child {
  padding-left: 0;
}
.dashboard-col:last-child {
  border-right: none;
  padding-right: 0;
}

/* 列标题 */
.col-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  margin-bottom: var(--space-lg);
  position: relative;
}
.col-title .mark {
  width: 0.25rem;
  height: 1rem;
  border-radius: 0.125rem;
}
/* 利用之前的 tint 变量赋予高级色彩 */
.bg-blue {
  background: var(--tint-blue-text);
}
.bg-orange {
  background: var(--tint-orange-text);
}
.bg-green {
  background: var(--tint-green-text);
}

.col-more {
  margin-left: auto;
  font-size: var(--font-size-xs);
  font-weight: normal;
  color: var(--color-text-secondary);
  text-decoration: none;
}
.col-more:hover {
  color: var(--color-primary);
}

/* --- 列表通用与定制 --- */
.dashboard-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.dashboard-col a {
  color: var(--color-text);
  text-decoration: none;
  transition: color var(--duration-fast);
}
.dashboard-col a:hover {
  color: var(--color-primary);
}

/* 1. 最新入库 */
.list-latest li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: var(--font-size-base);
}
.list-latest .date {
  font-family: monospace;
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
  flex-shrink: 0;
  margin-top: 0.4em;
}
.list-latest a {
  flex: 1;
  display: -webkit-box;
  /* -webkit-line-clamp: 1; */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 2. 热门排行 */
.list-ranking li {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  font-size: var(--font-size-base);
}
.list-ranking .rank {
  font-style: italic;
  font-weight: bold;
  font-family: serif;
  font-size: 1.1em;
  color: var(--color-text-secondary);
  width: 1rem;
  text-align: center;
  flex-shrink: 0;
}
/* 前三名使用醒目主题色 */
.list-ranking .rank.top {
  color: var(--tint-orange-text);
}
.list-ranking a,
.list-qa .a {
  flex: 1;
  /* white-space: nowrap; */
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 3. 政策问答 */
.list-qa li {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  border-bottom: 0.0625rem dashed var(--color-tag-bg);
  padding-bottom: 1rem;
}
.list-qa li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.list-qa .q {
  display: flex;
  gap: 0.5rem;
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-base);
}
.list-qa .q span {
  color: var(--tint-blue-text);
  flex-shrink: 0;
}
.list-qa .a {
  display: flex;
  gap: 0.5rem;
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: 1.5;
}
.list-qa .a span {
  color: var(--color-text-secondary);
  opacity: 0.5;
  flex-shrink: 0;
}
.list-qa .a div {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- 补充：给 tag-tint 加上鼠标悬浮提示效果 --- */
a.tag-tint {
  cursor: pointer;
  transition:
    transform var(--duration-fast),
    filter var(--duration-fast);
  text-decoration: none;
}
a.tag-tint:hover {
  transform: scale(1.05);
  filter: brightness(0.95);
}

/* =========================================================
   🚀 服务直通车 / 金刚区 (Navigation Grid)
   ========================================================= */

.pba-quick-nav-grid {
  display: grid;
  /* PC端默认4列排布，完美还原截图 */
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
  margin-top: var(--space-md);
  margin-bottom: 4rem;
  position: relative;
  z-index: 10;
}

/* 独立卡片样式 (复用 .card 基础样式，微调内边距) */
.quick-nav-item {
  display: flex;
  align-items: center;
  padding: 1rem 1.5rem;
  gap: 1rem;
  text-decoration: none;
  border-radius: var(--radius-md);
  transition:
    transform var(--duration-fast),
    box-shadow var(--duration-fast);

  /* 🔥 核心优化 1：引入微弱的主题色对角线渐变，打破死白/死黑的单调 */
  background: var(--nav-card-bg);
  /* 增加一个非常淡的高光内发光，让卡片看起来像微凸的玻璃面板 */
  box-shadow:
    0 0.25rem 0.75rem rgba(0, 0, 0, 0.05),
    inset 0 0.0625rem 0.0625rem rgba(255, 255, 255, 0.2);
}

.quick-nav-item:hover {
  transform: translateY(-0.25rem);
  /* 悬浮时阴影加深，且带有一点主题色的光晕 */
  box-shadow:
    0 0.75rem 1.5rem rgba(0, 0, 0, 0.12),
    0 0.25rem 1.25rem color-mix(in srgb, var(--color-primary) 16%, transparent);
}
/* --- 动态主题色彩配置 (通过 CSS 变量自动注入到背景中) --- */

:root[data-theme='light'] .quick-nav-item {
  /* 默认状态：极净的微霜化白，右下角极其微弱地融入主题青色 */
  --nav-card-bg: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.78) 0%,
    rgba(245, 253, 252, 0.36) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.8); /* 确保边框清脆 */
}

:root[data-theme='light'] .quick-nav-item:hover {
  /* 🔥 悬停微光魔法：
     叠加两个背景。底层是常规渐变；
     顶层是一个从左上角发出的白色径向高光。
     这会产生一种类似鼠标靠近时照亮了卡片左上角的 3D 视觉错觉！ */
  --nav-card-bg:
    radial-gradient(
      circle at 10% 10%,
      rgba(255, 255, 255, 0.8) 0%,
      transparent 60%
    ),
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.6) 0%,
      rgba(230, 246, 244, 0.7) 100%
    );

  /* 边框在光照方向（左上）变白，右下变透明，强化厚度感 */
  border-top-color: #ffffff;
  border-left-color: #ffffff;
  border-bottom-color: rgba(255, 255, 255, 0.4);
  border-right-color: rgba(255, 255, 255, 0.4);
}

/* 2. 🌑 深海暗黑主题 (Dark) */
:root[data-theme='dark'] .quick-nav-item {
  /* 从左上角的深蓝灰过渡到右下角的极夜黑，比原纯色更立体 */
  --nav-card-bg: linear-gradient(
    135deg,
    rgba(30, 45, 55, 0.6) 0%,
    rgba(15, 20, 25, 0.4) 100%
  );
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.2),
    inset 0 1px 1px rgba(255, 255, 255, 0.05);
}
:root[data-theme='dark'] .quick-nav-item:hover {
  /* 悬停时左上角光晕提亮，仿佛有一束微光照过来 */
  --nav-card-bg: linear-gradient(
    135deg,
    rgba(40, 70, 85, 0.7) 0%,
    rgba(15, 20, 25, 0.5) 100%
  );
}

/* 3. 🌊 科技蓝主题 (Blue) */
:root[data-theme='blue'] .quick-nav-item {
  /* 轻微的透白光泽，混合微弱的深蓝 */
  --nav-card-bg: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.15) 0%,
    rgba(255, 255, 255, 0.05) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.15);
}
:root[data-theme='blue'] .quick-nav-item:hover {
  --nav-card-bg: linear-gradient(
    135deg,
    rgba(185, 200, 246, 0.25) 0%,
    rgba(255, 255, 255, 0.08) 100%
  );
}
/* 图标容器 (利用主题系统里已有的 tint 变量) */
.quick-nav-item .nav-icon {
  width: 2.625rem;
  height: 2.625rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  /* 增加轻微渐变光泽 */
  background: linear-gradient(135deg, inherit, transparent);
}
.quick-nav-item .nav-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* 文字样式 */
.quick-nav-item span {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* =========================================================
   📋 网站底部 (Footer - 与主题色动态同步)
   ========================================================= */
.pba-footer {
  background: var(--footer-bg);
  color: var(--footer-text); /* 自动适配深浅字体 */
  font-size: var(--font-size-sm);
  padding-top: 3rem;
  transition: all var(--duration-fast);

  /* 🔥 核心：引入高斯模糊，让网页背景流淌到底部 */
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--footer-border);
}
.pba-footer a {
  color: inherit;
  text-decoration: none;
  transition: opacity var(--duration-fast);
  opacity: 0.8;
}
.pba-footer a:hover {
  opacity: 1;
}

.pba-footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 2rem;
  font-size: var(--font-size-sm);
}

/* 左侧：Logo与信息 */
.footer-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.footer-logo img {
  height: 2.5rem;
}
.footer-logo span {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: #ffffff;
  letter-spacing: 0.125rem;
}

.footer-details p {
  margin: 0 0 0.5rem 0;
  line-height: 1.6;
}

/* =========================================================
   右侧：备案与标识 (Footer Credentials)
   ========================================================= */
.footer-credentials {
  display: flex;
  gap: 2rem;
  align-items: center; /* 左右两组居中对齐 */
  text-align: left;
}

/* 1. 官方徽标组 */
.dzjg-mark-group {
  display: flex;
  gap: 1rem; /* 三个图标之间的间距 */
  align-items: center;
}
.dzjg-mark-group a {
  display: block;
  transition: transform var(--duration-fast);
}
.dzjg-mark-group a:hover {
  transform: translateY(-2px); /* 悬浮时整体图标微微上浮 */
}
.dzjg-mark-group img {
  height: 3rem; /* 统一限制高度，宽度按比例自适应，保证一行整齐 */
  width: auto;
  display: block;
  /* 如果你的图片包含白色背景，在暗黑模式下加一点圆角或阴影会让边缘更柔和 */
  border-radius: 0.125rem;
  object-fit: contain;
}

/* 2. 备案信息组 */
.beian-info {
  display: flex;
  flex-direction: column;
  gap: 0.375rem; /* 三行文字的行间距 */
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; /* 确保数字和字母显示清晰 */
}

.beian-info a {
  color: inherit;
  text-decoration: none;
  transition: color var(--duration-fast);
  display: inline-block;
}
/* 真正的链接悬停亮起 */
.beian-info a:not(.no-hover):hover {
  color: var(--color-primary-text, #fff);
}
/* 纯展示信息（如标识码）关闭手型和悬停动画 */
.beian-info a.no-hover {
  cursor: default;
}

.gongan-beian {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}
.gongan-beian img {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0; /* 确保公安图标不会被挤扁 */
}

/* 最底出版权区 (全主题自适应) */
.pba-copyright {
  text-align: center;
  /* 🌟 使用背景色的加深版 (混入25%的纯黑)，或者用主色的极低透明度，形成微弱的下沉感 */
  background-color: color-mix(in srgb, var(--footer-bg) 75%, #000000);

  padding: 1.25rem 0;
  font-size: var(--font-size-sm);
  /* 文字使用主题的次要文字颜色，并稍微降低透明度，不抢夺正文视觉 */
  color: color-mix(in srgb, var(--color-text-secondary) 80%, transparent);
  letter-spacing: 0.5px;

  /* 确保过渡丝滑 */
  transition: all var(--duration-fast);
}

/* 针对暗黑模式的特殊提亮 (因为深色背景下混黑会看不见边界) */
:root[data-theme='dark'] .pba-copyright {
  background-color: color-mix(in srgb, var(--footer-bg) 85%, #ffffff);
}
/* =========================================================
   📱 首页专属组件：响应式降级与折叠 (Responsive Breakpoints)
   (从 pbalayout-resize.css 迁移而来，实现就近原则)
   ========================================================= */

@media (min-width: 1921px) {
  .dashboard-tabs span {
    font-size: var(--font-size-xl);
  }
  .col-title,
  .dashboard-global-more,
  .quick-nav-item span {
    font-size: var(--font-size-lg);
  }
  .list-latest li,
  .list-ranking li,
  .list-qa .q,
  .col-more,
  .rcmd-title,
  .pba-search-type li,
  .policy-input {
    font-size: var(--font-size-md);
  }
  .list-qa .a,
  .rcmd-header,
  .tag-tint,
  .rcmd-date,
  .pba-home-tpcld-slide dd p,
  .pba-home-tpcld-title a,
  .pba-search-recomend dd,
  .suggest-header,
  .suggest-list li,
  .pba-copyright,
  .pba-footer-inner {
    font-size: var(--font-size-base);
  }
  .list-latest .date {
    font-size: var(--font-size-sm);
  }
  .pba-home-tpcld-tags.is-3d {
    min-height: 15rem;
  }
}
/* ≥2560 2K */
@media (min-width: 2560px) {
}
/* ≥3840 4K */
@media (min-width: 3840px) {
  .pba-logo h1 {
    font-size: var(--font-size-5xl);
  }
  .pba-section-header h2,
  .dashboard-tabs span,
  .pba-home-tpcld-title > span {
    font-size: var(--font-size-2xl);
  }
  .col-title,
  .dashboard-global-more,
  .quick-nav-item span {
    font-size: var(--font-size-xl);
  }
  .pba-toolbar,
  .list-latest li,
  .list-ranking li,
  .list-qa .q,
  .col-more,
  .rcmd-title,
  .pba-search-type li,
  .policy-input,
  .pba-home-tpcld-slide dd a {
    font-size: var(--font-size-lg);
  }
  .list-qa .a,
  .rcmd-header,
  .tag-tint,
  .rcmd-date,
  .pba-home-tpcld-slide dd p,
  .pba-home-tpcld-title a,
  .pba-search-recomend,
  .pba-search-recomend dd,
  .suggest-header,
  .suggest-list li,
  .pba-copyright,
  .pba-footer-inner,
  .pba-search-recomend dd,
  .list-latest .date,
  .tc-hint {
    font-size: var(--font-size-md);
  }
  .version-tag {
    font-size: var(--font-size-base);
  }
  .dashboard-header {
    padding: var(--space-md) var(--space-xl);
  }
  .pba-recommend-section {
    margin-top: var(--space-xl);
    margin-bottom: var(--space-xl);
    padding-top: var(--space-md);
    padding-bottom: var(--space-md);
  }
  .search-btn svg,
  .input-wrapper.has-value .clear-btn svg {
    width: 1.25em;
    height: 1.25em;
  }
}
/* --- 1. 平板及笔记本端适配 (1024px 以下) --- */
@media (max-width: 1024px) {
  /* 金刚区从 4列 变为 3列 */
  .pba-quick-nav-grid {
    grid-template-columns: repeat(3, 1fr);
    margin-top: 0;
  }

  /* 政策聚合面板 (Dashboard) 变为单列 */
  .dashboard-body {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .dashboard-col {
    padding: 0;
    border-right: none;
  }

  /* Footer 调整排列 */
  .pba-footer-inner {
    flex-direction: column;
    gap: 2.5rem;
    align-items: center;
  }

  /* 主题切换按钮避开常用点击区 */
  .theme-switcher {
    top: auto;
    bottom: 5rem; /* 🌟 提升高度，避开手机底部手势区 */
    right: 1rem;
  }
  .theme-menu {
    top: auto;
    bottom: calc(100% + 0.5rem); /* 菜单向上弹出 */
  }

  /* 毛玻璃面板在平板上放宽 */
  .pba-search-glass-panel {
    max-width: 90%;
  }
  .dashboard-body {
    display: flex;
    flex-direction: column;
  }
  .list-latest a,
  .list-ranking a,
  .list-qa .a {
    -webkit-line-clamp: unset;
    white-space: unset;
  }
  .suggest-panel-right {
    display: none;
  }
}

/* --- 2. 手机端极限适配 (768px 以下) --- */
@media (max-width: 768px) {
  .pba-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    padding: 0.75rem 0;
  }
  .pba-toolbar dt,
  .pba-toolbar dd {
    margin: 0;
    min-width: 0;
  }
  .pba-toolbar dt a {
    min-height: 2.75rem;
    white-space: nowrap;
  }
  .pba-toolbar dt b {
    white-space: nowrap;
  }
  .toolbar-actions {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    width: 100%;
    gap: 0.375rem;
    padding-top: 0.5rem;
    border-top: 0.0625rem solid color-mix(in srgb, currentColor 16%, transparent);
  }
  .toolbar-actions > * {
    min-width: 0;
  }
  .pba-toolbar .nav-trigger {
    width: 100%;
    min-width: 0;
    min-height: 2.75rem;
    justify-content: center;
    gap: 0.25rem;
    padding-inline: 0.375rem;
    font-size: var(--font-size-sm);
    white-space: nowrap;
  }
  .pba-toolbar .nav-trigger-icon {
    width: 1rem;
    height: 1rem;
    margin-right: 0.125rem;
  }
  .pba-toolbar .nav-trigger-icon-circle {
    width: 1.5rem;
    height: 1.5rem;
    margin-right: 0.125rem;
  }
  .pba-logo h1 {
    font-size: clamp(1.75rem, 1.5rem + 1.25vw, 2rem);
    line-height: 1.2;
    letter-spacing: clamp(0.04rem, 0.02rem + 0.2vw, 0.1rem);
  }
  .version-tag,
  .col-more,
  .beian-info {
    font-size: var(--font-size-sm);
  }

  /* 搜索区毛玻璃面板占满全屏宽 */
  .pba-search-glass-panel {
    max-width: 100%;
    padding: 1.5rem;
  }
  .pba-search-type {
    width: 100%;
    gap: 0.5rem;
  }
  .pba-search-type li {
    display: flex;
    flex: 1 1 0;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 2.75rem;
    padding: 0.5rem;
    line-height: 1.25;
    text-align: center;
    white-space: nowrap;
  }
  .search-flex {
    height: auto;
    flex-direction: column; /* 搜索框和按钮上下排列 */
    gap: 0.75rem;
  }
  .input-wrapper {
    height: 3.5rem; /* 保证高度不塌陷 */
    width: 100%;
  }
  .policy-input {
    height: 3rem;
  }
  .search-btn {
    height: 3rem;
    width: 100%;
    justify-content: center;
    border-radius: var(--radius-md);
  }
  /* 智能提示框位置反转 + 竖排双栏 */
  .search-suggest-box {
    top: auto;
    bottom: calc(100% + 0.75rem);
    flex-direction: column;
  }
  .suggest-panel-left {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }

  /* 热搜调整 */
  .pba-search-recomend {
    align-items: flex-start;
    flex-direction: column;
  }
  .pba-search-recomend dt {
    margin-bottom: var(--space-md);
    opacity: 1;
    font-size: var(--font-size-base);
  }

  /* 热门专题左右排版变上下排版 */
  .pba-home-topicloud {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
    padding: var(--space-md) 0;
  }
  .pba-home-topicloud > dt {
    border-right: none;
    padding-right: 0;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 2rem;
  }
  .pba-home-topicloud > dd {
    padding-left: 0;
    margin-left: 0;
  }
  .swiper-nav-prev,
  .swiper-nav-next {
    display: none; /* 手机端依靠滑动，隐藏箭头 */
  }

  /* 为您推荐卡片变单列 */
  .pba-recommend-grid {
    grid-template-columns: 1fr;
  }

  /* 政策聚合面板头部可滑动 */
  .dashboard-header {
    gap: 1rem;
    padding: 1rem var(--space-lg);
  }
  .dashboard-tabs {
    gap: 1rem;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 0.3125rem;
  }
  .dashboard-tabs span {
    padding: 0.5rem 0;
    font-size: var(--font-size-lg);
  }
  .col-title {
    font-size: var(--font-size-md);
  }
  .dashboard-body {
    padding: var(--space-lg);
  }

  /* 金刚区变两列 */
  .pba-quick-nav-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.625rem;
  }
  .quick-nav-item {
    padding: 1rem;
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }
  .quick-nav-item span {
    font-size: var(--font-size-sm);
  }

  /* Footer 徽标紧凑排列 */
  .footer-credentials {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }
  .dzjg-mark-group {
    flex-wrap: wrap;
    gap: 0.8rem;
  }
  .dzjg-mark-group img {
    height: 2.5rem;
  }
  .beian-info {
    gap: 0.5rem;
  }
  .nav-dropdown-wrapper {
    display: none;
  }
  /* 政策库矩阵在移动端不隐藏，改造成全屏弹层而不是简单消失，用更具体的选择器覆盖上面这条通用隐藏规则 */
  .pba-toolbar .region-nav-wrapper {
    display: block;
  }
  .region-nav-wrapper .region-nav-menu {
    position: fixed;
    inset: 0;
    z-index: 3000; /* 跟 NotificationModal 的 .pba-notify-overlay 同一量级，盖过页面其它内容 */
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    padding: 1rem;
    /* 覆盖桌面端那套 opacity/visibility/transform 的 hover 过渡效果——移动端没有 hover，
       纯粹靠 .active class 切换 display，避免两套显隐机制打架 */
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: none;
    min-width: 0;
    max-width: none;
    border: none;
    box-shadow: none;
    top: 0;
    right: 0;
  }
  .region-nav-wrapper .region-nav-menu.active {
    display: flex;
  }
}
@media (max-width: 360px) {
  .pba-search-type li {
    padding-inline: 0.25rem;
    font-size: var(--font-size-sm);
  }
}
@media (max-width: 481px) {
  .dashboard-header {
    align-items: flex-start;
    flex-direction: column;
  }
}
@media (max-width: 321px) {
  /* Logo 垂直居中堆叠 */
  .pba-logo {
    flex-direction: column;
  }
  .pba-logo h1 {
    width: 100%;
    text-align: center;
  }
  .pba-search-type {
    gap: var(--space-md);
  }
  .pba-search-type li {
    padding: 0.5rem 1rem;
    border-radius: 1em;
  }
  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .col-title {
    font-size: var(--font-size-md);
  }
}
