@charset "UTF-8";
/* ==========================================================================
   微云网络资讯站 · 样式表
   命名：BEM（block__element--modifier），不再出现 w1200 / list_article_con 这类
        按位置或数字命名、和内容无关的类名。
   策略：移动优先。基准样式写手机端，按 min-width 逐级增强到桌面。
   断点：640 大屏手机 / 768 平板竖 / 1024 平板横 · 小笔记本 / 1240 桌面
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. 设计变量
   -------------------------------------------------------------------------- */
:root {
  /* 品牌 */
  --brand: #1966e8;
  --brand-dark: #114fc0;
  --brand-soft: #eef4ff;
  --brand-line: #cddffc;
  --accent: #0ea5e9;

  /* 中性色 */
  --ink: #0d1726;
  --text: #3c4a5e;
  --muted: #6b7a8f;
  --faint: #a6b3c4;
  --line: #e8eef7;
  --line-soft: #f1f5fa;
  --bg: #f4f7fc;
  --surface: #fff;
  --footer-bg: #0b1527;

  /* 圆角 */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-pill: 999px;

  /* 阴影 */
  --shadow-1: 0 1px 2px rgba(13, 23, 38, .04), 0 8px 24px -18px rgba(13, 23, 38, .4);
  --shadow-2: 0 2px 8px rgba(13, 23, 38, .05), 0 16px 36px -22px rgba(13, 23, 38, .32);
  --shadow-brand: 0 10px 26px -12px rgba(25, 102, 232, .5);

  /* 尺度 */
  --wrap: 1350px;
  --gutter: 18px;
  --header-h: 60px;

  /* 动效 */
  --ease: cubic-bezier(.2, .7, .3, 1);
  --dur: .22s;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "HarmonyOS Sans SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

@media (min-width: 768px) {
  :root { --gutter: 24px; --header-h: 68px; }
}

@media (min-width: 1400px) {
  :root { --gutter: 0px; --header-h: 76px; }
}

/* --------------------------------------------------------------------------
   2. 重置
   -------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; display: block; border: 0; }
a { color: inherit; text-decoration: none; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

input, textarea { font: inherit; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}

::selection { background: var(--brand); color: #fff; }

/* 滚动条（Chrome / Edge） */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb {
  background: #ccd6e4;
  border: 3px solid var(--bg);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover { background: #b3c1d4; }

/* --------------------------------------------------------------------------
   3. 布局容器
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--flush { padding-inline: 0; }

/* 主内容 + 侧栏：手机单列，≥1024 双列 */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  padding-block: 20px 48px;
}

@media (min-width: 1024px) {
  .layout {
    grid-template-columns: minmax(0, 1fr) 26.5%;
    gap: 30px;
    padding-block: 30px 72px;
  }
}

.layout__main { min-width: 0; }
.layout__aside { min-width: 0; }

/* 桌面：侧栏比视口矮时让它跟着滚动（目前只有列表页满足），
   比视口高时不 sticky，否则底部内容永远看不到 */
@media (min-width: 1024px) {
  .layout--aside-sticky .layout__aside {
    position: sticky;
    top: 16px;
    align-self: start;
  }
}

/* 跳转到正文（键盘用户） */
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--brand);
  color: #fff;
  border-radius: var(--radius-sm);
  transition: top var(--dur) var(--ease);
}

.skip-link:focus { top: 12px; }

/* --------------------------------------------------------------------------
   4. 站点头部
   -------------------------------------------------------------------------- */
.site-header {
  position: relative;
  z-index: 100;
  background: var(--surface);
  box-shadow: 0 1px 0 var(--line);
}

/* 4.1 顶部工具条：手机上收起，桌面显示 */
.topbar {
  display: none;
  border-bottom: 1px solid var(--line-soft);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 42px;
  font-size: 13px;
  color: var(--muted);
}

.topbar__notice { color: var(--faint); }

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

.topbar__link { transition: color var(--dur) var(--ease); }
.topbar__link:hover { color: var(--brand); }

/* 电话是转化入口，字号比左右两侧大一档，别缩在角落 */
.topbar__phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: .2px;
}

.topbar__phone:hover { color: var(--brand); }

.topbar__phone svg { flex: 0 0 auto; width: 16px; height: 16px; }

@media (min-width: 768px) {
  .topbar { display: block; }
}

/* 4.2 品牌与导航行 */
.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--header-h);
}

.masthead__logo { flex: 0 0 auto; display: block; }

/* 原图 170×60，按高度控制、宽度自适应，避免宽高两个 max 相互挤压导致显示过小 */
.masthead__logo img {
  width: auto;
  height: 38px;
  max-width: none;
}

@media (min-width: 768px) {
  .masthead__logo img { height: 42px; }
}

@media (min-width: 1024px) {
  .masthead__logo img { height: 50px; }
}

/* 汉堡按钮：≥1024 隐藏 */
.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  border-radius: var(--radius-sm);
}

.nav-toggle__bar {
  display: block;
  width: 22px;
  height: 2px;
  margin-inline: auto;
  border-radius: 2px;
  background: var(--ink);
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* 4.3 导航：手机上是从头部下方滑出的面板 */
.nav {
  position: absolute;
  inset: 100% 0 auto;
  background: var(--surface);
  border-top: 1px solid var(--line-soft);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  box-shadow: 0 24px 32px -24px rgba(13, 23, 38, .45);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease),
    visibility var(--dur) var(--ease);
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
}

.nav.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav__list { padding: 6px 0 12px; }

.nav__item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  border-bottom: 1px solid var(--line-soft);
}

.nav__item:last-child { border-bottom: 0; }

.nav__link {
  flex: 1 1 auto;
  display: block;
  padding: 13px var(--gutter);
  font-size: 15.5px;
  font-weight: 500;
  color: var(--ink);
}

.nav__link.is-current { color: var(--brand); }

/* 子菜单展开按钮（仅手机和平板出现） */
.nav__expand {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-right: 6px;
}

.nav__expand::before {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform var(--dur) var(--ease);
}

.nav__item.is-expanded > .nav__expand::before {
  transform: rotate(-135deg) translate(-2px, -2px);
}

.nav__sub {
  flex: 0 0 100%;
  display: none;
  padding: 2px 0 10px;
  background: #f4f8fd;
}

.nav__item.is-expanded > .nav__sub { display: block; }

.nav__sub-link {
  display: block;
  padding: 10px var(--gutter) 10px 30px;
  font-size: 14px;
  color: var(--text);
}

.nav__sub-link:hover,
.nav__sub-link:focus-visible { color: var(--brand); }

/* 桌面：横排 + hover 下拉 */
@media (min-width: 1024px) {
  .nav-toggle { display: none; }

  .nav {
    position: static;
    flex: 1 1 auto;
    background: none;
    border: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    max-height: none;
    overflow: visible;
    display: flex;
    justify-content: flex-end;
  }

  .nav__list {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0;
  }

  .nav__item {
    position: relative;
    display: block;
    border: 0;
  }

  .nav__link {
    position: relative;
    padding: 0 14px;
    line-height: var(--header-h);
    font-size: 15px;
    white-space: nowrap;
  }

  .nav__link::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 20px;
    width: 0;
    height: 2px;
    border-radius: 2px;
    background: var(--brand);
    transform: translateX(-50%);
    transition: width var(--dur) var(--ease);
  }

  .nav__item:hover > .nav__link,
  .nav__item:focus-within > .nav__link { color: var(--brand); }

  .nav__item:hover > .nav__link::after,
  .nav__item:focus-within > .nav__link::after { width: 18px; }

  .nav__expand { display: none; }

  .nav__sub {
    position: absolute;
    top: 100%;
    right: -6px;
    min-width: 172px;
    display: block;
    padding: 8px;
    background: var(--surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .16s var(--ease), transform .16s var(--ease),
      visibility .16s var(--ease);
  }

  .nav__item:hover > .nav__sub,
  .nav__item:focus-within > .nav__sub {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav__sub-link {
    padding: 9px 12px;
    font-size: 14px;
    border-radius: var(--radius-xs);
    white-space: nowrap;
  }

  .nav__sub-link:hover { background: var(--brand-soft); }

  .nav__item:last-child > .nav__link { padding-right: 0; }
}

/* --------------------------------------------------------------------------
   5. 轮播
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: linear-gradient(115deg, #10419f 0%, #1966e8 62%, #2f8ef0 100%);
  box-shadow: var(--shadow-2);
  /* 手机按原图比例，不裁广告语；桌面略微压扁，与右栏首块等高 */
  aspect-ratio: 2.34;
  touch-action: pan-y;
}

@media (min-width: 1024px) {
  .hero { aspect-ratio: 2.515; border-radius: var(--radius-lg); }
}

.hero__track {
  position: absolute;
  inset: 0;
  display: flex;
  will-change: transform;
  transition: transform .5s var(--ease);
}

.hero__slide {
  flex: 0 0 100%;
  height: 100%;
}

.hero__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero__link { display: block; height: 100%; }

/* 圆点 */
.hero__dots {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: var(--radius-pill);
  background: rgba(8, 18, 34, .22);
  backdrop-filter: blur(6px);
}

@media (min-width: 768px) {
  .hero__dots { bottom: 16px; gap: 8px; padding: 6px 11px; }
}

.hero__dot {
  width: 18px;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, .45);
  transition: width var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

.hero__dot.is-active {
  width: 28px;
  background: #fff;
}

/* 左右箭头：手机上靠滑动，箭头只在有鼠标指针时出现 */
.hero__arrow {
  display: none;
  position: absolute;
  top: 50%;
  width: 40px;
  height: 40px;
  margin-top: -20px;
  border-radius: 50%;
  /* 默认半透明，别抢图片的注意力；hover 再变实 */
  background: rgba(255, 255, 255, .45);
  box-shadow: 0 4px 14px -9px rgba(13, 23, 38, .45);
  transition: transform var(--dur) var(--ease), background-color var(--dur) var(--ease),
    opacity var(--dur) var(--ease);
}

.hero__arrow::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  border-top: 2px solid var(--brand);
  border-right: 2px solid var(--brand);
  border-radius: 1px;
}

.hero__arrow--prev { left: 16px; }
.hero__arrow--prev::before { transform: translate(-40%, -50%) rotate(-135deg); }

.hero__arrow--next { right: 16px; }
.hero__arrow--next::before { transform: translate(-60%, -50%) rotate(45deg); }

.hero__arrow:hover { background: rgba(255, 255, 255, .95); transform: scale(1.06); }

@media (hover: hover) and (pointer: fine) {
  .hero__arrow { display: block; }
}

@media (min-width: 1024px) {
  .hero__arrow { width: 42px; height: 42px; margin-top: -21px; }
}

/* --------------------------------------------------------------------------
   6. 文章列表
   -------------------------------------------------------------------------- */
.news {
  margin-top: 20px;
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-1);
}

@media (min-width: 1024px) {
  .news { margin-top: 22px; border-radius: var(--radius-lg); }
}

/* 列表页的 .news 是主栏第一个元素，上方间距由 .layout 的 padding 负责，
   这里的 margin-top 会让左栏比右侧侧栏低一截，去掉 */
.layout__main > .news:first-child { margin-top: 0; }

.news__list { padding: 0 16px; }

@media (min-width: 768px) {
  .news__list { padding: 0 26px; }
}

@media (min-width: 1024px) {
  .news__list { padding: 0 30px; }
}

.news-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px;
  /* meta 放回左列，缩略图纵向跨两行——
     否则 meta 横跨整行会跑到图片下方，图片右侧空出一大块 */
  grid-template-areas:
    "title   title"
    "excerpt thumb"
    "meta    thumb";
  column-gap: 12px;
  row-gap: 8px;
  padding: 18px 0 16px;
  border-bottom: 1px solid var(--line-soft);
}

.news-item:last-child { border-bottom: 0; }

@media (min-width: 640px) {
  .news-item {
    grid-template-columns: minmax(0, 1fr) 150px;
    column-gap: 16px;
    padding: 20px 0 18px;
  }
}

@media (min-width: 1400px) {
  .news-item { grid-template-columns: 252px minmax(0, 1fr); }
}

@media (min-width: 1024px) {
  .news-item {
    grid-template-columns: 232px minmax(0, 1fr);
    grid-template-areas:
      "title   title"
      "thumb   excerpt"
      "thumb   meta";
    column-gap: 24px;
    row-gap: 0;
    padding: 26px 0 24px;
  }
}

.news-item__title {
  grid-area: title;
  font-size: 16.5px;
  font-weight: 600;
  line-height: 1.48;
  letter-spacing: -.2px;
  color: var(--ink);
}

@media (min-width: 768px) {
  .news-item__title { font-size: 17.5px; }
}

@media (min-width: 1024px) {
  .news-item__title {
    font-size: 18.5px;
    margin-bottom: 13px;
  }
}

.news-item__title a { transition: color var(--dur) var(--ease); }
.news-item:hover .news-item__title a { color: var(--brand); }

.news-item__thumb {
  grid-area: thumb;
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--line-soft);
  aspect-ratio: 16 / 11;
  align-self: start;
}

/* 绝对定位，让高度完全由容器的 aspect-ratio 决定，
   否则 img 的固有比例会把容器撑得长短不一 */
.news-item__thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .38s var(--ease);
}

.news-item:hover .news-item__thumb img { transform: scale(1.045); }

.news-item__thumb-empty {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #eef3fb, #e3ecf8);
}

/* 摘要限行：grid 子项会被 blockify，-webkit-line-clamp 在这里不可靠，
   所以用 line-height 倍数算 max-height 来卡行数 */
.news-item__excerpt {
  grid-area: excerpt;
  align-self: start;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--muted);
  display: block;
  overflow: hidden;
  max-height: calc(1.65em * 3);
}

/* 1024 以下：缩略图跨两行但只占 aspect-ratio 的高度，下方会留白。
   让它撑满两行，由 img 的 object-fit: cover 裁剪，不变形 */
@media (max-width: 1023px) {
  .news-item__thumb {
    align-self: stretch;
    aspect-ratio: auto;
  }
}

@media (min-width: 1024px) {
  /* 原文摘要 120 多字，原来只给 2 行（约 60 字），右侧会空出一大块；
     放宽到 5 行能说完，作者行再贴到底，和 160px 高的缩略图上下对齐 */
  .news-item__excerpt {
    font-size: 14.5px;
    line-height: 1.7;
    max-height: calc(1.7em * 5);
  }

  .news-item__meta { align-self: end; }
}

.news-item__meta {
  grid-area: meta;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  font-size: 12px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

@media (min-width: 1024px) {
  .news-item__meta { margin-top: auto; padding-top: 10px; font-size: 12.5px; }
}

.news-item__meta > span { position: relative; }

/* 桌面用圆点分隔，手机靠 gap */
@media (min-width: 1024px) {
  .news-item__meta > span + span::before {
    content: "";
    position: absolute;
    left: -7px;
    top: 50%;
    width: 3px;
    height: 3px;
    margin-top: -1px;
    border-radius: 50%;
    background: #d4dde9;
  }
}

.news-item__author { color: #8a97aa; }

@media (max-width: 639px) {
  .news-item__author { display: none; }
}

@media (max-width: 359px) {
  .news-item { grid-template-columns: minmax(0, 1fr) 76px; }
  .news-item__title { font-size: 16px; }
  .news-item__excerpt { font-size: 13px; max-height: calc(1.65em * 3); }
}

/* --------------------------------------------------------------------------
   7. 侧栏卡片
   -------------------------------------------------------------------------- */
.panel {
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-1);
  padding: 18px;
}

.panel + .panel,
.panel + .promo-card,
.promo-card + .panel { margin-top: 16px; }

@media (min-width: 1024px) {
  .panel { border-radius: var(--radius-lg); padding: 22px 22px 20px; }
  .panel + .panel,
  .panel + .promo-card,
  .promo-card + .panel { margin-top: 20px; }
}

.panel__title {
  position: relative;
  margin-bottom: 12px;
  padding-left: 11px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .2px;
  color: var(--ink);
}

.panel__title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 14px;
  margin-top: -7px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--brand), var(--accent));
}

/* 热门文章：带序号 */
.rank-list__item { position: relative; }

/* 标题只占一行，超出用省略号 */
.rank-list__link {
  display: block;
  padding: 7px 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color var(--dur) var(--ease);
}

.rank-list__link:hover { color: var(--brand); }

/* 栏目导航：两列链接 */
.cat-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.cat-links__link {
  display: block;
  padding: 8px 10px;
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--text);
  background: #f7fafe;
  border-radius: var(--radius-xs);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.cat-links__link:hover {
  color: var(--brand);
  background: var(--brand-soft);
}

/* 标签 */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-cloud__link {
  display: block;
  padding: 5px 12px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  background: #f4f7fc;
  border-radius: var(--radius-pill);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.tag-cloud__link:hover {
  color: var(--brand);
  background: var(--brand-soft);
}

/* 侧栏广告位 */
.promo-card {
  display: block;
  overflow: hidden;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-1);
}

@media (min-width: 1024px) {
  .promo-card { border-radius: var(--radius-lg); }
}

.promo-card img { width: 100%; height: auto; transition: transform .4s var(--ease); }
.promo-card:hover img { transform: scale(1.02); }

/* 侧栏在平板上堆到列表下方时，广告位不要拉满 */
@media (min-width: 768px) and (max-width: 1023px) {
  .layout__aside { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
  .layout__aside > * + * { margin-top: 0; }
}

@media (max-width: 767px) {
  .promo-card { max-width: 460px; margin-inline: auto; }
}

/* --------------------------------------------------------------------------
   8. 页头（列表页 / 详情页）
   -------------------------------------------------------------------------- */
.page-head { padding: 20px 0 4px; }

@media (min-width: 1024px) {
  .page-head { padding: 26px 0 6px; }
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 8px;
  font-size: 13px;
  color: var(--faint);
}

.breadcrumb__item { position: relative; }

.breadcrumb__item + .breadcrumb__item::before {
  content: "/";
  position: absolute;
  left: -6px;
  color: #d4dde9;
}

.breadcrumb__link { color: #5c6b80; transition: color var(--dur) var(--ease); }
.breadcrumb__link:hover { color: var(--brand); }

.breadcrumb__item--current { color: var(--ink); font-weight: 500; }

/* 面包屑最后一项（当前栏目，纯文本）稍微加深，作为页面落点 */
.page-head > .breadcrumb > .breadcrumb__item:last-child {
  color: var(--ink);
}

.page-head__title {
  margin-top: 6px;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -.6px;
  color: var(--ink);
}

@media (min-width: 768px) {
  .page-head__title { font-size: 30px; }
}

@media (min-width: 1024px) {
  .page-head__title { font-size: 32px; letter-spacing: -.8px; margin-bottom: 18px; }
}

/* --------------------------------------------------------------------------
   9. 分页
   -------------------------------------------------------------------------- */
.pagination { margin-top: 24px; }

@media (min-width: 1024px) {
  .pagination { margin-top: 32px; }
}

/* 按结构选：静态站输出 <ul class="pagination__list"><li class="pagination__item">，
   迅睿 {$pages} 输出 <ul class="pagination"><li class="active">，两者都吃这套规则 */
.pagination > ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pagination > ul > li {
  min-width: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow-1);
  transition: box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.pagination > ul > li > a,
.pagination > ul > li > span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 38px;
  padding: 0 12px;
  font-size: 13.5px;
  color: var(--muted);
  transition: color var(--dur) var(--ease);
}

.pagination > ul > li:hover { box-shadow: var(--shadow-2); }
.pagination > ul > li:hover > a { color: var(--brand); }

/* 当前页：静态站用 .pagination__item--current，迅睿用 .active */
.pagination > ul > li.active,
.pagination > ul > li.current,
.pagination > ul > li.pagination__item--current {
  background: var(--brand);
  border-color: var(--brand);
  box-shadow: var(--shadow-brand);
}

.pagination > ul > li.active > a,
.pagination > ul > li.active > span,
.pagination > ul > li.current > a,
.pagination > ul > li.current > span,
.pagination > ul > li.pagination__item--current > a,
.pagination > ul > li.pagination__item--current > span {
  color: #fff;
}

/* --------------------------------------------------------------------------
   10. 详情页
   -------------------------------------------------------------------------- */
.article {
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-1);
  padding: 22px 18px 26px;
}

@media (min-width: 768px) {
  .article { padding: 30px 30px 30px; }
}

@media (min-width: 1024px) {
  .article { border-radius: var(--radius-lg); padding: 40px 42px 34px; }
}

.article__head {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line-soft);
}

@media (min-width: 1024px) {
  .article__head { padding-bottom: 20px; }
}

.article__title {
  font-size: 21px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: -.3px;
  color: var(--ink);
}

@media (min-width: 768px) {
  .article__title { font-size: 25px; }
}

@media (min-width: 1024px) {
  .article__title { font-size: 28px; line-height: 1.45; }
}

.article__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

@media (min-width: 1024px) {
  .article__meta > span + span { position: relative; padding-left: 13px; }
  .article__meta > span + span::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 3px;
    height: 3px;
    margin-top: -1px;
    border-radius: 50%;
    background: #d4dde9;
  }
}

/* 正文排版 */
.article__body {
  font-size: 15.5px;
  line-height: 1.9;
  color: var(--text);
  padding-top: 6px;
}

@media (min-width: 1024px) {
  .article__body { font-size: 16px; line-height: 1.95; }
}

.article__body p { margin: 14px 0; }

.article__body h2 {
  position: relative;
  margin: 32px 0 6px;
  padding-left: 13px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: -.1px;
  color: var(--ink);
}

@media (min-width: 1024px) {
  .article__body h2 { font-size: 19px; margin-top: 38px; }
}

.article__body h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 4px;
  height: 16px;
  margin-top: -8px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--brand), var(--accent));
}

.article__body h3 {
  margin: 24px 0 8px;
  font-size: 16.5px;
  font-weight: 600;
  color: var(--ink);
}

.article__body strong { color: var(--ink); font-weight: 600; }
.article__body a { color: var(--brand); }
.article__body a:hover { text-decoration: underline; }

.article__body img {
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 22px auto;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-1);
}

.article__body blockquote {
  margin: 22px 0;
  padding: 15px 18px;
  background: var(--brand-soft);
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: #2c4a7c;
}

.article__body ul,
.article__body ol { margin: 14px 0 14px 4px; padding-left: 20px; }
.article__body ul li { list-style: disc; }
.article__body ol li { list-style: decimal; }
.article__body li { margin: 6px 0; line-height: 1.85; }

/* 正文表格 */
.article__body .table-wrap {
  margin: 22px 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  -webkit-overflow-scrolling: touch;
}

.article__body table {
  width: 100%;
  min-width: 420px;
  border-collapse: collapse;
  font-size: 14.5px;
  line-height: 1.6;
}

.article__body th,
.article__body td {
  padding: 11px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line-soft);
}

.article__body thead th {
  font-weight: 600;
  color: var(--ink);
  background: #f4f8fd;
  white-space: nowrap;
}

.article__body tbody tr:last-child td { border-bottom: 0; }
.article__body tbody tr:nth-child(even) { background: #fafcff; }
.article__body tbody tr:hover { background: var(--brand-soft); }

@media (max-width: 639px) {
  /* 360 太挤，三列每列只有 120px，中文频繁换行；放宽到 480 让内容完整，靠横向滑动看 */
  .article__body table { font-size: 13.5px; min-width: 480px; }
  .article__body th,
  .article__body td { padding: 9px 11px; }
}

/* 点赞 */
.article-like {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 30px 0 22px;
  padding-top: 26px;
  border-top: 1px solid var(--line-soft);
}

.article-like__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 500;
  color: var(--brand);
  background: #eef4fe;
  border-radius: 999px;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease),
    transform var(--dur) var(--ease);
}

.article-like__btn:hover { background: #e2edfd; }

.article-like__btn.is-liked {
  color: #fff;
  background: var(--brand);
  box-shadow: 0 8px 18px -8px rgba(25, 102, 232, .65);
}

.article-like__btn:active { transform: scale(.96); }

.article-like__icon {
  width: 17px;
  height: 17px;
  transition: transform var(--dur) var(--ease);
}

.article-like__btn.is-liked .article-like__icon { transform: translateY(-1px) scale(1.08); }

.article-like__count {
  font-size: 13px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

.article-like__count [data-like-count] { color: var(--text); font-weight: 600; }

/* 文章标签 */
.article__tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 28px 0 6px;
}

.article__tags-label {
  font-size: 13px;
  color: var(--faint);
}

.article__tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 13px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--brand);
  background: #eef4fe;
  border-radius: 999px;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.article__tag:hover {
  color: #fff;
  background: var(--brand);
}

.article__note {
  margin: 28px 0 6px;
  padding: 16px 18px;
  background: #f7f9fc;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  line-height: 1.8;
  color: #8a97aa;
}

/* 正文顶部服务入口条 */
.promo-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 8px;
  margin: 16px 0 6px;
  padding: 10px;
  background: #f7faff;
  border-radius: var(--radius-md);
}

@media (min-width: 640px) {
  .promo-bar {
    grid-template-columns: 30% minmax(0, 1fr) 16%;
    gap: 10px;
    padding: 12px;
  }
}

.promo-bar__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.promo-bar__brand:hover {
  border-color: var(--brand-line);
  box-shadow: 0 8px 20px -12px rgba(25, 102, 232, .45);
}

.promo-bar__brand-icon {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  padding: 7px;
  box-sizing: content-box;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 10px;
}

.promo-bar__brand-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
}

.promo-bar__brand-tag {
  display: inline-block;
  margin-top: 3px;
  padding: 1px 9px;
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--brand);
  border: 1px solid var(--brand-line);
  border-radius: var(--radius-pill);
}

.promo-bar__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  min-height: 52px;
}

.promo-bar__link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 8px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  text-align: center;
  color: var(--brand);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease),
    border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.promo-bar__link:hover {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
  box-shadow: 0 8px 18px -10px rgba(25, 102, 232, .6);
}

.promo-bar__contact {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--brand);
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  border-radius: var(--radius-xs);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease),
    border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.promo-bar__contact:hover {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
  box-shadow: 0 8px 18px -10px rgba(25, 102, 232, .6);
}

.promo-bar__contact .icon {
  width: 26px;
  height: 26px;
  color: var(--brand);
  transition: color var(--dur) var(--ease);
}

.promo-bar__contact:hover .icon { color: #fff; }
.promo-bar__contact span { white-space: nowrap; }

/* 手机上服务条竖排，联系我们压成一行，别占一整块高度 */
@media (max-width: 639px) {
  .promo-bar__brand-icon { width: 30px; height: 30px; }
  .promo-bar__contact {
    flex-direction: row;
    gap: 8px;
    padding: 12px 10px;
  }
  .promo-bar__contact .icon { width: 22px; height: 22px; }
}

/* 底部相关推荐 */
.related {
  margin-top: 18px;
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-1);
  padding: 20px 18px 8px;
}

@media (min-width: 1024px) {
  .related { border-radius: var(--radius-lg); padding: 24px 30px 10px; }
}

.related__title {
  position: relative;
  margin-bottom: 6px;
  padding-left: 11px;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
}

.related__title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 15px;
  margin-top: -8px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--brand), var(--accent));
}

.related__item { border-bottom: 1px dashed var(--line); }
.related__item:last-child { border-bottom: 0; }

.related__link {
  display: block;
  padding: 12px 0 12px 16px;
  position: relative;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text);
  transition: color var(--dur) var(--ease);
}

.related__link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 21px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #d4dde9;
  transition: background-color var(--dur) var(--ease);
}

.related__link:hover { color: var(--brand); }
.related__link:hover::before { background: var(--brand); }

/* --------------------------------------------------------------------------
   11. 页脚
   -------------------------------------------------------------------------- */
.site-footer {
  position: relative;
  background: linear-gradient(180deg, #0b1527 0%, #080f1c 100%);
  color: #8a99ae;
  padding: 28px 0 24px;
}

.site-footer::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(25, 102, 232, 0), rgba(25, 102, 232, .8) 22%,
      rgba(14, 165, 233, .7) 62%, rgba(25, 102, 232, 0));
}

.site-footer a { transition: color var(--dur) var(--ease); }
.site-footer a:hover { color: #fff; }

.footer-cols {
  margin-bottom: 26px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 16px;
}

@media (min-width: 768px) {
  .footer-cols { grid-template-columns: repeat(4, 1fr); gap: 24px; }
}

@media (min-width: 1024px) {
  .site-footer { padding-top: 40px; }
}

.footer-col__title {
  position: relative;
  margin-bottom: 12px;
  padding-left: 11px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .3px;
  color: #fff;
}

.footer-col__title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 12px;
  margin-top: -6px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--brand), var(--accent));
}

.footer-col__link {
  display: block;
  padding: 3px 0;
  font-size: 13.5px;
  line-height: 1.75;
  color: #8a99ae;
}

/* 友情链接整体压低存在感：不用分隔线、字号小一档、颜色更贴近页脚底色 */
.friends {
  margin-top: 0;
  padding-top: 12px;
  font-size: 11.5px;
  line-height: 1.9;
  color: #46536a;
}

.friends__label { color: #55627a; }
.friends__link {
  display: inline-block;
  margin-right: 9px;
  color: #46536a;
}
.friends__link:hover { color: #8b9bb4; }

.copyright {
  margin-top: 12px;
  font-size: 12.5px;
  color: #4e5c70;
  letter-spacing: .2px;
}

.copyright a { color: #4e5c70; }
.copyright a:hover { color: #b9c6d8; }

/* --------------------------------------------------------------------------
   11.5 404
   -------------------------------------------------------------------------- */
.err {
  padding: 76px 0 96px;
  text-align: center;
}

.err__code {
  margin: 0;
  font-size: clamp(86px, 15vw, 128px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.05em;
  background: linear-gradient(135deg, #1966e8, #7aa7f5);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.err__title {
  margin-top: 20px;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--ink);
}

.err__desc {
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--muted);
}

.err__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

.err__cats {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
  font-size: 13.5px;
  line-height: 2.1;
  color: var(--faint);
}

.err__cats-label { margin-right: 4px; }

.err__cat {
  display: inline-block;
  margin: 0 8px;
  color: var(--text);
  transition: color var(--dur) var(--ease);
}

.err__cat:hover { color: var(--brand); }

@media (max-width: 639px) {
  .err { padding: 52px 0 68px; }
  .err__title { font-size: 20px; }
  .err__desc { font-size: 14px; }
}

/* --------------------------------------------------------------------------
   12. 悬浮工具（电话 / 微信 / 回到顶部）
   -------------------------------------------------------------------------- */
.float-tools {
  position: fixed;
  right: 12px;
  bottom: 22%;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 7px;
  background: rgba(255, 255, 255, .96);
  border-radius: var(--radius-md);
  /* 不再用 0 0 0 1px 描边，否则整个悬浮栏看着像带边框的按钮组 */
  box-shadow: 0 8px 26px -8px rgba(13, 23, 38, .22);
  backdrop-filter: blur(8px);
}

@media (min-width: 1240px) {
  .float-tools { bottom: 26%; right: 14px; }
}

/* 1366~1489 这段屏幕右侧空白（45~70px）放不下 54px 的悬浮栏，会压住版心内容列。
   收窄到 46px 并贴边，重叠降到 7px 左右，正好落在卡片 12px 内边距里，不压文字。
   1490 以上右侧空白够用，用回上面的常规定位。 */
@media (min-width: 1240px) and (max-width: 1489px) {
  .float-tools {
    right: 6px;
    padding: 4px;
  }

  .float-tools__item { width: 38px; }
}

/* 版心固定 1350，屏幕更宽时让悬浮工具靠近内容区，别孤零零贴在屏幕边 */

.float-tools__item {
  position: relative;
  display: grid;
  place-items: center;
  gap: 2px;
  width: 40px;
  padding: 7px 0;
  border-radius: var(--radius-sm);
  color: var(--muted);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

/* 弹层在按钮左侧 8px 处，中间那段空隙鼠标经过时会掉 hover，弹层一闪就消失。
   用一块透明热区把按钮和弹层连起来（热区属于按钮本身，hover 不会断）。 */
.float-tools__item::before {
  content: "";
  position: absolute;
  top: 0;
  right: 100%;
  width: 14px;
  height: 100%;
}

.float-tools__item:hover { background: var(--brand-soft); color: var(--brand); }

.float-tools__item .icon {
  width: 20px;
  height: 20px;
  opacity: .85;
  transition: opacity var(--dur) var(--ease);
}

.float-tools__item:hover .icon { opacity: 1; }
/* 只作用于「电话」「微信」标签；弹层是 span，不能用后代选择器一起管，
   否则 .float-tools__item span 的特异性会压过 .float-tools__pop 的字号 */
.float-tools__item > span:not(.float-tools__pop) {
  font-size: 11px;
  letter-spacing: .4px;
}

.float-tools__pop {
  position: absolute;
  right: 48px;
  top: 50%;
  transform: translateY(-50%) scale(.96);
  padding: 11px 18px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  background: #fff;
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 26px -10px rgba(13, 23, 38, .34);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease),
    visibility var(--dur) var(--ease);
}

.float-tools__item:hover .float-tools__pop,
.float-tools__item:focus-visible .float-tools__pop,
.float-tools__item.is-open .float-tools__pop {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) scale(1);
}

/* 点击展开时给按钮一个选中态，让人知道可以再点一下收起 */
.float-tools__item.is-open {
  color: var(--brand);
  background: var(--brand-soft);
}

/* 手机上没有 hover，二维码长按保存即可，这里让弹层可点 */
.float-tools__pop img { pointer-events: auto; }

/* max-width:none 必须加：父级是宽度自适应的绝对定位元素，
   全局 img{max-width:100%} 会形成循环依赖，把图片压成 0 宽 */
.float-tools__pop img {
  width: 132px;
  max-width: none;
  height: auto;
  display: block;
}

/* 手机上收小一档，挪到右下角；屏窄只留图标（文字靠 aria-label 给读屏） */
@media (max-width: 767px) {
  .float-tools {
    right: 8px;
    bottom: 165px;  /* 再往上抬，避开底部内容区 */
    gap: 6px;
    padding: 5px;
    background: rgba(255, 255, 255, .94);
  }

  .float-tools__item {
    width: 38px;
    padding: 7px 0;
  }

  /* 文字保留：光看图标有人认不出是电话还是别的 */
  .float-tools__item > span:not(.float-tools__pop) { font-size: 10px; }
  .float-tools__item .icon { width: 18px; height: 18px; }

  .float-tools__pop {
    right: 42px;
    padding: 9px 14px;
    font-size: 15px;
  }

  /* 触摸屏没有真正的 hover：手指按下会粘住 :hover，导致点电话时弹层闪一下。
     这里让 hover 不再展开弹层，只有点击（.is-open，微信按钮）才展开。
     电话本身是 <a href="tel:">，直接拨号即可。 */
  .float-tools__item:not(.is-open):hover .float-tools__pop {
    opacity: 0;
    visibility: hidden;
  }

  .float-tools__item.is-open .float-tools__pop {
    opacity: 1;
    visibility: visible;
  }
}

.to-top {
  position: fixed;
  right: 12px;
  bottom: 16px;
  z-index: 90;
  display: none;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 8px 24px -8px rgba(13, 23, 38, .26);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease),
    visibility var(--dur) var(--ease);
}

@media (min-width: 1240px) {
  .to-top { display: grid; right: 14px; bottom: 18px; }
}

.to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { transform: translateY(-2px); }

.to-top .icon {
  width: 18px;
  height: 18px;
  color: var(--muted);
  transition: color var(--dur) var(--ease);
}

.to-top:hover .icon { color: var(--brand); }

/* 手机上也要回到顶部：悬浮栏高约 118，底部 14，往上留 8 间隙 */
@media (max-width: 767px) {
  /* 手机上回到顶部跟 PC 端一样贴右下角（PC 为 right 14 / bottom 18） */
  .to-top {
    display: grid;
    right: 14px;
    bottom: 18px;
  }
}


/* --------------------------------------------------------------------------
   12.5 工具合集页
   -------------------------------------------------------------------------- */
.tool-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  margin: 0 0 14px;
  padding: 10px 0;
  background: var(--bg);
}

.tool-nav__list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.tool-nav__list::-webkit-scrollbar { display: none; }

.tool-nav__link {
  display: block;
  padding: 7px 14px;
  font-size: 13.5px;
  line-height: 1.4;
  white-space: nowrap;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
}

.tool-nav__link:hover,
.tool-nav__link.is-active {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
}

/* 平板窄一点时收紧胶囊，让 12 个分类也能一屏放下 */
@media (max-width: 1279px) {
  .tool-nav__link {
    padding: 6px 11px;
    font-size: 13px;
  }
  .tool-nav__list { gap: 7px; }
}

.tool-group { scroll-margin-top: 72px; }

.tool-group + .tool-group { margin-top: 26px; }

.tool-group__title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 12px;
  padding-left: 11px;
  position: relative;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
}

.tool-group__title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 15px;
  margin-top: -8px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--brand), var(--accent));
}

.tool-group__count {
  font-size: 12.5px;
  font-weight: 400;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

/* 合并后的大类，在标题后面标出它包含哪些原有子类，便于查找 */
.tool-group__sub {
  margin-left: 7px;
  font-size: 12.5px;
  font-weight: 400;
  color: var(--faint);
}

@media (max-width: 639px) {
  .tool-group__sub { display: none; }
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (min-width: 640px) {
  .tool-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .tool-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
}

@media (min-width: 1400px) {
  .tool-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

.tool-card {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 100%;
  padding: 12px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-1);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.tool-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
}

@media (max-width: 639px) {
  .tool-card { padding: 10px; gap: 8px; }
  .tool-card__logo { width: 34px; height: 34px; font-size: 14px; }
  .tool-card__name { font-size: 13.5px; }
  .tool-card__desc { font-size: 12px; }
}

.tool-card__logo {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  overflow: hidden;
  border-radius: var(--radius-xs);
  background: #f4f7fc;
  font-size: 15px;
  font-weight: 600;
  color: var(--brand);
}

.tool-card__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* 不少站点只提供 16×16 favicon，放大到 40px 时用它减少糊感 */
  image-rendering: -webkit-optimize-contrast;
}

.tool-card__body { min-width: 0; }

.tool-card__name {
  display: block;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tool-card__desc {
  display: block;
  margin-top: 2px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--muted);
  overflow: hidden;
  max-height: 2.9em;
  word-break: break-all;
}


/* 小工具页（网址批量打开 / Markdown 清除） */
.tool-panel {
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-1);
  padding: 18px;
}

@media (min-width: 768px) {
  .tool-panel { border-radius: var(--radius-lg); padding: 26px 28px; }
}

.tool-panel__hint {
  font-size: 13px;
  line-height: 1.75;
  color: var(--muted);
}

.tool-panel__hint + .tool-panel__hint { margin-top: 4px; }

.tool-field {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 20px;
  margin: 16px 0;
  font-size: 13.5px;
  color: var(--text);
}

.tool-field label { display: inline-flex; align-items: center; gap: 8px; }

.tool-input {
  width: 92px;
  padding: 7px 10px;
  font-size: 13.5px;
  color: var(--text);
  background: #f8fafd;
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
}

.tool-input:focus { outline: 0; border-color: var(--brand); background: #fff; }

.tool-textarea {
  display: block;
  width: 100%;
  min-height: 240px;
  padding: 14px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.75;
  color: var(--text);
  background: #f8fafd;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  resize: vertical;
}

.tool-textarea:focus { outline: 0; border-color: var(--brand); background: #fff; }

.tool-textarea::placeholder { color: var(--faint); }

.tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  background: var(--brand);
  border-radius: var(--radius-sm);
  transition: background-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.tool-btn:hover { background: var(--brand-dark); box-shadow: var(--shadow-brand); }

.tool-btn--ghost {
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
}

.tool-btn--ghost:hover {
  color: var(--brand);
  background: var(--brand-soft);
  border-color: var(--brand-line);
  box-shadow: none;
}

.tool-split { display: grid; gap: 14px; }

@media (min-width: 768px) {
  .tool-split { grid-template-columns: 1fr 1fr; }
}

.tool-msg {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.75;
  color: var(--brand);
}

.tool-msg:empty { display: none; }

.tool-note {
  margin-top: 14px;
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--faint);
}

/* --------------------------------------------------------------------------
   13. 通用工具类
   -------------------------------------------------------------------------- */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   14. 无障碍偏好
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
