/* =====================================================================
 * 站点体验精修层（site-polish.css）
 * 加载在 theme-override.css / logo-override.css / news-card.css 之后。
 * 只做覆盖与修饰，不改 React 结构，零构建风险。
 * ===================================================================== */

/* —— 1. 内容默认可见 ——
   原 .reveal 初始 opacity:0，靠 IntersectionObserver 触发；
   锚点跳转、整页截图、快速滚动过头时会出现整块空白（像没加载完）。*/
.reveal {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

/* —— 2. 隐藏构建器水印 —— */
[data-custom-element="miaoda-watermark"] {
  display: none !important;
}

/* —— 3. 卡片交互：轻抬 + 冷色投影 —— */
.soft-card {
  transition: transform .35s cubic-bezier(.2, .7, .2, 1),
              box-shadow .35s cubic-bezier(.2, .7, .2, 1),
              border-color .35s ease;
}
@media (hover: hover) and (pointer: fine) {
  .soft-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 44px -24px rgba(10, 110, 168, .40);
    border-color: rgba(10, 110, 168, .26) !important;
  }
}

/* —— 4. 现代排版：标题断行平衡、正文避免孤字 —— */
h1, h2, h3 { text-wrap: balance; }
p, li { text-wrap: pretty; }
h1, h2 { letter-spacing: -.012em; }

/* —— 5. 页头导航：hover 下划线滑动 —— */
header nav a,
header .ly-ssr-nav a {
  position: relative;
  transition: color .22s ease;
}

/* —— 6. 键盘可达性 —— */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid #0a6ea8;
  outline-offset: 3px;
  border-radius: 6px;
}

/* —— 7. 选中色 —— */
::selection {
  background: rgba(10, 110, 168, .18);
  color: #073049;
}

/* —— 8. 平滑滚动（尊重系统“减少动效”） —— */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .soft-card { transition: none !important; }
  .soft-card:hover { transform: none !important; }
}

/* —— 9. 细滚动条 —— */
* { scrollbar-width: thin; scrollbar-color: #b9cede transparent; }

/* —— 10. 顶部阅读进度（site-ux.js 创建） —— */
.ly-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, #0a6ea8 0%, #29c3f2 100%);
  z-index: 80;
  pointer-events: none;
  transition: width .12s linear;
}

/* —— 11. 右下悬浮工具条（site-ux.js 创建） —— */
.ly-fab {
  position: fixed;
  right: 18px;
  bottom: 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 70;
}
.ly-fab-btn {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  border: 1px solid rgba(10, 110, 168, .18);
  background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #0a6ea8;
  box-shadow: 0 10px 26px -12px rgba(16, 42, 66, .35);
  cursor: pointer;
  transition: transform .24s cubic-bezier(.2, .7, .2, 1),
              background-color .24s ease,
              color .24s ease,
              box-shadow .24s ease;
  -webkit-tap-highlight-color: transparent;
}
.ly-fab-btn:hover {
  background: #0a6ea8;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 16px 30px -14px rgba(10, 110, 168, .55);
}
.ly-fab-btn:active { transform: scale(.96); }
.ly-fab-btn svg { width: 20px; height: 20px; }
.ly-fab-top {
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .28s ease, transform .28s ease, visibility .28s ease,
              background-color .24s ease, color .24s ease;
}
.ly-fab-top.is-on { opacity: 1; visibility: visible; transform: none; }

/* —— 12. 移动端节奏 —— */
@media (max-width: 639px) {
  .ly-fab { right: 12px; bottom: 16px; gap: 8px; }
  .ly-fab-btn { width: 44px; height: 44px; border-radius: 13px; }
  .ly-fab-btn svg { width: 18px; height: 18px; }
}
/* —— 13. 页头不透明：滚动时下面的正文透出来，导航看起来“叠字” —— */
header[class*="nav-glass"],
header.nav-glass {
  background: rgba(255, 255, 255, .965) !important;
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  box-shadow: 0 1px 0 rgba(12, 50, 71, .07), 0 10px 28px -22px rgba(12, 50, 71, .45);
}

/* —— 14. 新闻卡信息行：不换行，去掉“更新于”噪音 —— */
a[href^="/news/"] > div:first-child:not(:has(img)) {
  flex-wrap: nowrap !important;
  overflow: hidden;
  white-space: nowrap;
}
a[href^="/news/"] > div:first-child:not(:has(img)) > span {
  white-space: nowrap;
}
a[href^="/news/"] > div:first-child:not(:has(img)) > span:nth-child(3) {
  display: none !important;
}

/* —— 15. 服务卡：卡片内边距收紧，减少空荡感 —— */
.soft-card.p-7 { padding: 24px 26px !important; }

/* —— 16. 详情页正文排版：行高略松，段落间距统一 —— */
.article-body p, .prose p { line-height: 1.9; margin-bottom: 1.05em; }