/* ============================================================
   软件工具库 · 样式
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

:root {
  --bg: #f4f6fb;
  --bg-soft: #eef1f8;
  --card: #ffffff;
  --card-2: #fbfcff;
  --text: #14171f;
  --muted: #6a7385;
  --faint: #98a1b3;
  --line: #e5e9f2;
  --line-2: #d7dce8;
  --brand: #4f7cff;
  --gold: #f5a524;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-md: 0 2px 4px rgba(16, 24, 40, .04), 0 14px 30px -18px rgba(16, 24, 40, .28);
  --shadow-lg: 0 3px 6px rgba(16, 24, 40, .05), 0 24px 48px -24px rgba(16, 24, 40, .35);
  --radius: 18px;
  --font: "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}

html[data-theme="dark"] {
  --bg: #0c0e13;
  --bg-soft: #10131a;
  --card: #151923;
  --card-2: #171c27;
  --text: #e9ecf4;
  --muted: #9aa4b8;
  --faint: #6f7a8f;
  --line: #232a38;
  --line-2: #2d3546;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
  --shadow-md: 0 2px 4px rgba(0, 0, 0, .35), 0 16px 32px -20px rgba(0, 0, 0, .9);
  --shadow-lg: 0 3px 8px rgba(0, 0, 0, .45), 0 26px 54px -24px rgba(0, 0, 0, 1);
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 520px at 82% -8%, color-mix(in srgb, var(--brand) 13%, transparent), transparent 62%),
    radial-gradient(760px 460px at -12% 12%, color-mix(in srgb, #8b5cf6 11%, transparent), transparent 58%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: color-mix(in srgb, var(--brand) 28%, transparent); }

/* ---------- 布局 ---------- */

.shell {
  display: grid;
  grid-template-columns: 284px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--card) 62%, transparent);
  backdrop-filter: blur(14px) saturate(1.1);
  overflow-y: auto;
  z-index: 30;
}

.main { min-width: 0; }

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 40px 72px;
}

/* ---------- 品牌 ---------- */

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 6px 2px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-size: 19px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(145deg, #5b8bff, #3f63e0 60%, #7b5cff);
  box-shadow: 0 8px 18px -8px rgba(79, 124, 255, .9), inset 0 1px 0 rgba(255, 255, 255, .35);
  letter-spacing: 0;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.brand-text strong { font-size: 15px; letter-spacing: .2px; }
.brand-text span { font-size: 11.5px; color: var(--faint); }

/* ---------- 导航 ---------- */

.nav { display: flex; flex-direction: column; gap: 3px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 11px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13.5px;
  text-align: left;
  cursor: pointer;
  transition: background .16s ease, color .16s ease, transform .16s ease;
  position: relative;
}

.nav-item:hover { background: color-mix(in srgb, var(--text) 5%, transparent); color: var(--text); }
.nav-item:focus-visible { outline: 2px solid color-mix(in srgb, var(--brand) 60%, transparent); outline-offset: 2px; }

.nav-item .nav-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--c, var(--faint));
  flex: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--c, var(--faint)) 16%, transparent);
}

.nav-item .nav-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.nav-item .nav-count {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: var(--faint);
  padding: 1px 6px;
  border-radius: 7px;
  background: color-mix(in srgb, var(--text) 5%, transparent);
}

.nav-item.is-active {
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  color: var(--text);
  font-weight: 600;
}

.nav-item.is-active .nav-count { background: color-mix(in srgb, var(--brand) 20%, transparent); color: color-mix(in srgb, var(--brand) 70%, var(--text)); }
.nav-item.is-active .nav-dot { box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }

.nav-sep { height: 1px; margin: 10px 8px; background: var(--line); }

/* ---------- 二级分类导航 ---------- */

.nav-group { margin-top: 8px; }
.nav-group:first-of-type { margin-top: 2px; }

.nav-item.group { font-weight: 650; color: var(--text); }
.nav-item.group .nav-count { background: color-mix(in srgb, var(--text) 7%, transparent); }

.nav-subs {
  margin: 2px 0 4px 19px;
  padding-left: 9px;
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.nav-item.sub { font-size: 12.5px; padding: 6px 9px; }
.nav-item.sub .nav-dot { width: 5px; height: 5px; box-shadow: none; }
.nav-item.sub .nav-count { font-size: 10.5px; }

@media (max-width: 980px) {
  .nav-subs { display: none; }
  .nav-group { margin: 0; }
}

.side-foot {
  margin-top: auto;
  font-size: 11.5px;
  line-height: 1.75;
  color: var(--faint);
  padding: 12px 12px 4px;
  border-top: 1px dashed var(--line-2);
}

.dot-ok {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #22c55e;
  margin-right: 7px;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, .18);
  vertical-align: 1px;
}

.side-contact { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line-2); display: flex; flex-direction: column; gap: 6px; }
.sc-title { font-size: 11.5px; font-weight: 650; color: var(--text); }
.sc {
  text-align: left;
  border: 1px solid var(--line);
  background: var(--card-2);
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  padding: 6px 9px;
  border-radius: 8px;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease;
}
.sc:hover { color: var(--text); border-color: var(--line-2); }

.clickable { cursor: pointer; }
.clickable:hover { text-decoration: underline; }

/* ---------- 悬浮「有事找我」 ---------- */

.float-contact { position: fixed; right: 18px; bottom: 18px; z-index: 80; }
.fc-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 16px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #4f7cff, #7b5cff);
  color: #fff;
  font: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 26px -8px rgba(79, 124, 255, .9);
  transition: transform .15s ease, box-shadow .15s ease;
}
.fc-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -8px rgba(79, 124, 255, .95); }
.fc-pop {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 190px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow-lg);
}
.fc-pop[hidden] { display: none; }
.fc-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  text-align: left;
}
.fc-item:hover { background: color-mix(in srgb, var(--brand) 10%, transparent); }
.fc-item span { font-size: 15px; }

@media (max-width: 560px) {
  .float-contact { right: 12px; bottom: 12px; }
  .fc-btn { padding: 10px 13px; font-size: 12.5px; }
}

/* ---------- 顶栏 ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 40px;
  border-bottom: 1px solid transparent;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(16px) saturate(1.2);
  transition: border-color .2s ease, background .2s ease;
}

.topbar.is-stuck {
  border-bottom-color: var(--line);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
}

.topbar-title {
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .2px;
  color: var(--muted);
  white-space: nowrap;
}

/* 顶栏只有标题和按钮，按钮靠右 */
.topbar { justify-content: space-between; }
.topbar .icon-btn { margin-left: auto; }

/* ---------- 大搜索框 ---------- */

.searchbox {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 760px;
  height: 64px;
  margin-top: 24px;
  padding: 0 18px;
  border: 1.5px solid var(--line-2);
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 14px 34px -22px rgba(16, 24, 40, .55), var(--shadow-sm);
  transition: border-color .16s ease, box-shadow .16s ease;
}

.searchbox:focus-within {
  border-color: color-mix(in srgb, var(--brand) 55%, var(--line));
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--brand) 12%, transparent),
              0 18px 40px -24px rgba(79, 124, 255, .7);
}

.searchbox svg {
  width: 22px;
  height: 22px;
  flex: none;
  fill: none;
  stroke: var(--faint);
  stroke-width: 1.9;
  stroke-linecap: round;
}

.searchbox input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 17px;
}

.searchbox input::placeholder { color: var(--faint); }
.searchbox input::-webkit-search-cancel-button { -webkit-appearance: none; }

.searchbox kbd {
  flex: none;
  font-family: inherit;
  font-size: 11px;
  color: var(--faint);
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  border-radius: 7px;
  padding: 2px 7px;
  background: var(--bg-soft);
}

.q-clear {
  flex: none;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 9px;
  background: color-mix(in srgb, var(--text) 7%, transparent);
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.q-clear:hover { background: color-mix(in srgb, var(--text) 13%, transparent); color: var(--text); }

/* 热门关键词 */
.hot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  max-width: 760px;
  margin-top: 14px;
}
.hot-label { font-size: 12px; color: var(--faint); }
.hot-chip {
  font: inherit;
  font-size: 12.5px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px dashed var(--line-2);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.hot-chip:hover {
  color: color-mix(in srgb, var(--brand) 75%, var(--text));
  border-color: color-mix(in srgb, var(--brand) 45%, var(--line));
  background: color-mix(in srgb, var(--brand) 8%, transparent);
}

mark {
  background: color-mix(in srgb, var(--brand) 26%, transparent);
  color: inherit;
  border-radius: 3px;
  padding: 0 1px;
}

@media (max-width: 560px) {
  .searchbox { height: 54px; padding: 0 14px; border-radius: 15px; }
  .searchbox input { font-size: 15px; }
  .searchbox kbd { display: none; }
}

.search {
  flex: 1;
  max-width: 560px;
  display: flex;
  align-items: center;
  gap: 9px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  box-shadow: var(--shadow-sm);
  transition: border-color .16s ease, box-shadow .16s ease;
}

.search:focus-within {
  border-color: color-mix(in srgb, var(--brand) 55%, var(--line));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 14%, transparent);
}

.search svg {
  width: 16px; height: 16px;
  flex: none;
  fill: none;
  stroke: var(--faint);
  stroke-width: 1.9;
  stroke-linecap: round;
}

.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
}

.search input::placeholder { color: var(--faint); }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }

.search kbd {
  font-family: inherit;
  font-size: 11px;
  color: var(--faint);
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  border-radius: 6px;
  padding: 1px 6px;
  background: var(--bg-soft);
}

.icon-btn {
  width: 40px; height: 40px;
  flex: none;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: color .16s ease, border-color .16s ease, transform .16s ease;
}

.icon-btn:hover { color: var(--text); border-color: var(--line-2); transform: translateY(-1px); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.icon-btn .i-moon { display: none; }
html[data-theme="dark"] .icon-btn .i-sun { display: none; }
html[data-theme="dark"] .icon-btn .i-moon { display: block; }

/* ---------- Hero ---------- */

.hero { padding: 46px 0 6px; }

.eyebrow {
  margin: 0 0 14px;
  font-size: 11px;
  letter-spacing: .18em;
  color: var(--faint);
  font-weight: 600;
}
.eyebrow span { margin: 0 4px; }

.hero h1 {
  margin: 0;
  font-size: clamp(30px, 3.6vw, 44px);
  line-height: 1.16;
  letter-spacing: -.02em;
  font-weight: 700;
}

.hero h1 em {
  font-style: normal;
  background-image: linear-gradient(100deg, #4f7cff, #8b5cf6 40%, #ec4899 70%, #4f7cff);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shine 5s linear infinite;
}

@keyframes shine { to { background-position: 220% center; } }

.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }

.badge {
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--brand) 22%, var(--line));
  background: color-mix(in srgb, var(--brand) 8%, var(--card));
  color: color-mix(in srgb, var(--brand) 62%, var(--text));
  box-shadow: var(--shadow-sm);
}

.contact-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 20px; }
.contact-lead { font-size: 13px; font-weight: 650; color: var(--text); }

.contact-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border-radius: 11px;
  border: 1px solid var(--line-2);
  background: var(--card);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, border-color .15s ease;
}
.contact-chip:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.contact-chip .ci { font-size: 14px; }
.contact-chip i { font-style: normal; font-size: 10.5px; color: var(--faint); margin-left: 3px; }

.lede {
  margin: 14px 0 0;
  max-width: 640px;
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--muted);
}

.stats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }

.stat {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--card) 80%, transparent);
  font-size: 12px;
  color: var(--muted);
  box-shadow: var(--shadow-sm);
}

.stat b { font-size: 14px; color: var(--text); font-variant-numeric: tabular-nums; }

/* ---------- 分组 ---------- */

.section { margin-top: 38px; animation: rise .5s cubic-bezier(.22, .68, .3, 1) both; }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.section-head h2 {
  margin: 0;
  font-size: 16.5px;
  font-weight: 650;
  letter-spacing: -.01em;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.section-head h2::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--c, var(--brand));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--c, var(--brand)) 15%, transparent);
}

.section-head .sec-desc { font-size: 12.5px; color: var(--faint); }

.kws { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-left: 2px; }
.kw {
  font-size: 11px;
  line-height: 1.4;
  color: var(--muted);
  padding: 2px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--c, var(--brand)) 9%, transparent);
  border: 1px solid color-mix(in srgb, var(--c, var(--brand)) 18%, transparent);
  white-space: nowrap;
}

.eyebrow b { color: var(--text); font-weight: 700; letter-spacing: 0; }

/* 署名印章 */
.sign { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.sign-seal {
  width: 54px;
  height: 54px;
  flex: none;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0;
  background: linear-gradient(145deg, #5b8bff, #7b5cff);
  box-shadow: 0 12px 26px -12px rgba(79, 124, 255, .95), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.sign-text { font-size: 13px; color: var(--muted); letter-spacing: .04em; }

@media (max-width: 560px) {
  .sign-seal { width: 46px; height: 46px; font-size: 24px; border-radius: 13px; }
}
.section-head .sec-count {
  font-size: 11.5px;
  color: var(--faint);
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px solid var(--line);
}

/* ---------- 卡片 ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
  align-items: start;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 16px 16px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--card), var(--card-2));
  box-shadow: var(--shadow-sm);
  transition: transform .18s cubic-bezier(.2, .7, .3, 1), box-shadow .18s ease, border-color .18s ease;
  animation: rise .45s cubic-bezier(.22, .68, .3, 1) both;
  animation-delay: calc(var(--i, 0) * 22ms);
}

.card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--c, var(--brand)) 40%, var(--line));
  box-shadow: var(--shadow-md);
}

.card-top { display: flex; align-items: flex-start; gap: 11px; }

.tile {
  width: 42px; height: 42px;
  flex: none;
  display: grid;
  place-items: center;
  font-size: 20px;
  line-height: 1;
  border-radius: 12px;
  background: color-mix(in srgb, var(--c, var(--brand)) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--c, var(--brand)) 22%, transparent);
}

.card-meta { min-width: 0; flex: 1; padding-top: 1px; }

.card-meta h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -.01em;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tags { display: flex; flex-wrap: wrap; gap: 4px; }

.tag {
  font-size: 10.5px;
  line-height: 1;
  padding: 3px 6px;
  border-radius: 6px;
  color: var(--muted);
  background: color-mix(in srgb, var(--text) 5.5%, transparent);
  border: 1px solid color-mix(in srgb, var(--text) 6%, transparent);
  white-space: nowrap;
}

.tag.cat {
  color: color-mix(in srgb, var(--c, var(--brand)) 62%, var(--text));
  background: color-mix(in srgb, var(--c, var(--brand)) 11%, transparent);
  border-color: color-mix(in srgb, var(--c, var(--brand)) 20%, transparent);
}

.star {
  flex: none;
  width: 28px; height: 28px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--line-2);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: color .15s ease, background .15s ease, transform .15s ease;
}

.star:hover { background: color-mix(in srgb, var(--gold) 12%, transparent); color: var(--gold); transform: scale(1.08); }
.star.on { color: var(--gold); }
.star:focus-visible { outline: 2px solid color-mix(in srgb, var(--gold) 60%, transparent); outline-offset: 1px; }

.desc {
  margin: 0;
  font-size: 12.8px;
  line-height: 1.68;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}

.links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; padding-top: 2px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  padding: 5px 9px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--card) 40%, transparent);
  color: var(--muted);
  font: inherit;
  font-size: 11.8px;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background .15s ease, transform .15s ease;
}

.chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.chip:hover {
  color: var(--text);
  border-color: color-mix(in srgb, var(--c, var(--brand)) 40%, var(--line));
  transform: translateY(-1px);
}

.chip.primary {
  color: color-mix(in srgb, var(--c, var(--brand)) 68%, var(--text));
  background: color-mix(in srgb, var(--c, var(--brand)) 10%, transparent);
  border-color: color-mix(in srgb, var(--c, var(--brand)) 32%, transparent);
  font-weight: 600;
}

.chip.primary:hover { background: color-mix(in srgb, var(--c, var(--brand)) 16%, transparent); }

.chip.arrow::after {
  content: "↗";
  font-size: 10px;
  opacity: .6;
}

.chip.extra { display: none; }
.card.open .chip.extra { display: inline-flex; animation: rise .28s ease both; }

.chip.more { color: var(--faint); border-style: dashed; }
.chip.copy { color: var(--faint); }
.chip.copy:hover { color: var(--text); }

/* ---------- 空状态 / 结果头 ---------- */

.result-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 34px 0 14px;
  font-size: 13px;
  color: var(--muted);
}
.result-head b { color: var(--text); font-size: 15px; }

.empty {
  margin: 70px auto;
  text-align: center;
  color: var(--muted);
}
.empty .big { font-size: 40px; margin-bottom: 10px; }
.empty p { margin: 0; font-size: 13.5px; }
.empty .hint { margin-top: 8px; font-size: 12px; color: var(--faint); }

/* ---------- 页脚 ---------- */

.foot {
  margin-top: 64px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--faint);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.foot b { color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translate(-50%, 16px);
  padding: 9px 16px;
  border-radius: 11px;
  background: color-mix(in srgb, var(--text) 92%, transparent);
  color: var(--bg);
  font-size: 12.5px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 90;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 动画 ---------- */

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
}

/* ---------- 响应式 ---------- */

@media (max-width: 1080px) {
  .wrap { padding: 0 26px 64px; }
  .topbar { padding: 12px 26px; }
}

@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: sticky;
    top: 0;
    height: auto;
    flex-direction: column;
    gap: 10px;
    padding: 10px 16px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow: visible;
  }
  .brand { padding: 2px 2px 0; }
  .brand-mark { width: 34px; height: 34px; font-size: 16px; border-radius: 10px; }
  .brand-text span { display: none; }
  .nav {
    flex-direction: row;
    overflow-x: auto;
    gap: 6px;
    padding-bottom: 2px;
    scrollbar-width: none;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav-item { width: auto; white-space: nowrap; padding: 7px 11px; font-size: 12.5px; }
  .nav-item .nav-count { display: none; }
  .nav-sep { display: none; }
  .side-foot { display: none; }
  .topbar { top: 0; padding: 10px 16px; gap: 10px; }
  .topbar-title { display: none; }
  .hero { padding-top: 30px; }
  .wrap { padding: 0 16px 56px; }
  .grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .hero h1 { font-size: 27px; }
  .lede { font-size: 13.5px; }
  .search kbd { display: none; }
  .section-head .sec-desc { display: none; }
}

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--text) 16%, transparent);
  border: 3px solid transparent;
  background-clip: padding-box;
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, var(--text) 28%, transparent); background-clip: padding-box; }

/* ---------- 添加软件按钮 ---------- */

.add-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 40px;
  padding: 0 13px;
  flex: none;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--brand) 34%, var(--line));
  background: color-mix(in srgb, var(--brand) 11%, var(--card));
  color: color-mix(in srgb, var(--brand) 72%, var(--text));
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}

.add-btn:hover {
  transform: translateY(-1px);
  background: color-mix(in srgb, var(--brand) 17%, var(--card));
  border-color: color-mix(in srgb, var(--brand) 50%, var(--line));
}

.add-btn .plus { font-size: 15px; line-height: 1; margin-top: -1px; }

.nav-ico { width: 14px; text-align: center; font-size: 11px; flex: none; }

/* ---------- 弹窗 ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: color-mix(in srgb, #070a10 55%, transparent);
  backdrop-filter: blur(5px);
  animation: fade .16s ease both;
}

.modal[hidden] { display: none; }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.modal-card {
  width: min(540px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  padding: 20px 22px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  animation: pop .22s cubic-bezier(.2, .8, .3, 1) both;
}

@keyframes pop {
  from { opacity: 0; transform: translateY(12px) scale(.985); }
  to { opacity: 1; transform: none; }
}

.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.modal-head h3 { margin: 0; font-size: 16px; font-weight: 650; letter-spacing: -.01em; }

.modal-x {
  width: 30px; height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--faint);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.modal-x:hover { background: color-mix(in srgb, var(--text) 7%, transparent); color: var(--text); }

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--muted);
}

.field .req { color: #ef4444; }

.field input,
.field select,
.field textarea {
  font: inherit;
  font-size: 13.5px;
  color: var(--text);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 11px;
  outline: 0;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: color-mix(in srgb, var(--brand) 55%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 13%, transparent);
}

.field textarea { resize: vertical; min-height: 54px; line-height: 1.5; }

.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.modal-actions { display: flex; gap: 8px; margin-left: auto; }

.btn {
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  transition: background .15s ease, filter .15s ease, transform .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn.ghost:hover { background: color-mix(in srgb, var(--text) 5%, transparent); }
.btn.primary {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(145deg, #5b8bff, #3f63e0);
  box-shadow: 0 8px 18px -10px rgba(79, 124, 255, .9);
}
.btn.primary:hover { filter: brightness(1.06); }

.data-tools { display: flex; gap: 14px; }

.linky {
  border: 0;
  padding: 2px 0;
  background: transparent;
  color: var(--faint);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline dotted;
}
.linky:hover { color: var(--brand); }

.modal-note { margin: 10px 0 0; font-size: 11.5px; line-height: 1.65; color: var(--faint); }

body.modal-open { overflow: hidden; }

.chip.act { font-size: 11.5px; color: var(--faint); border-style: dashed; }
.chip.act:hover { color: var(--text); border-color: var(--line-2); }
.chip.act.danger:hover { color: #ef4444; border-color: color-mix(in srgb, #ef4444 42%, var(--line)); }

.result-head .muted { color: var(--faint); font-size: 12px; }

@media (max-width: 980px) {
  .add-label { display: none; }
  .add-btn { padding: 0 11px; }
}

@media (max-width: 560px) {
  .row2 { grid-template-columns: 1fr; gap: 0; }
  .modal-foot { align-items: stretch; }
  .modal-actions { margin-left: 0; width: 100%; }
  .modal-actions .btn { flex: 1; }
}
