:root {
  /* ?? ? ? doc/??????.md ?2 */
  --primary: #005cb1;
  --primary-container: #2475d3;
  --primary-fixed: #d5e3ff;
  --primary-fixed-dim: #a8c8ff;
  --on-primary: #ffffff;
  --error: #ba1a1a;

  /* ????? */
  --bg: #f9f9f9;
  --surface-gray: #f9f9f9;
  --surface: #f9f9ff;
  --content-bg: #fbfbfe;
  --card: #ffffff;
  --surface-lowest: #ffffff;
  --surface-container-low: #f2f3fc;
  --surface-container: #ecedf6;
  --surface-container-high: #e6e8f0;
  --surface-container-highest: #e1e2ea;
  --text: #191c22;
  --on-surface: #191c22;
  --muted: #414752;
  --on-surface-variant: #414752;
  --outline: #727784;
  --border: #e5e7eb;
  --border-subtle: #e5e7eb;
  --outline-variant: #c1c6d4;

  /* ??????????? + ????? ? doc/??????.md ?2.3 */
  --sidebar-bg: #2a2e36;
  --sidebar-border: #3d434e;
  --sidebar-text: #f4f5f7;
  --sidebar-text-muted: #c5c9d2;
  --sidebar-hover-bg: rgba(255, 255, 255, 0.08);
  --sidebar-active-bg: rgba(255, 255, 255, 0.12);
  --sidebar-active-text: #ffffff;
  --sidebar-child-active-bg: rgba(168, 200, 255, 0.18);
  --sidebar-child-active-text: #d5e3ff;
  --sidebar-action-bg: #343842;

  /* ?? */
  --vibrant-orange: #ff9800;
  --vibrant-pink: #e91e63;
  --vibrant-green: #4caf50;
  --vibrant-blue: #00bcd4;

  /* ?? */
  --header-height: 64px;
  --sidebar-width: 210px;
  --sidebar-width-collapsed: 64px;
  --layout-padding-x: 1rem;
  --desktop-breakpoint: 1024px;
  --card-gap: 1rem;
  --section-padding: 3rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-full: 9999px;

  --font-sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.material-symbols-outlined {
  font-family: "Material Symbols Outlined";
  font-weight: normal;
  font-style: normal;
  font-size: 1.25rem;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 var(--layout-padding-x); }
.site-header {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-height); }
.logo { font-weight: 700; color: var(--primary); text-decoration: none; font-size: 1.25rem; }
.nav-links a { margin-left: 1rem; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.875rem; }
.nav-links a:hover { color: var(--primary); }
.main { padding: 2rem 1rem 3rem; }
.site-footer { border-top: 1px solid var(--border); padding: 1.5rem 0; color: var(--muted); font-size: 0.875rem; }

/* ?? ?????? ?? */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--card-gap);
  overflow: visible;
}
.tool-card {
  position: relative;
  z-index: 1;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 0.65rem 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  transition: box-shadow 0.3s, border-color 0.3s, transform 0.3s;
}
.tool-card:hover {
  z-index: 2;
  border-color: var(--primary-fixed-dim);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}
.tool-card__icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--surface-container);
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.2s;
}
.tool-card:hover .tool-card__icon {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}
.tool-card__icon img {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-xl);
  object-fit: cover;
}
.tool-card__icon-fallback {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--muted);
}
.tool-card__body {
  flex: 1;
  min-width: 0;
  padding-top: 0;
}
.tool-card__title {
  margin: 0 0 0.15rem;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s;
}
.tool-card:hover .tool-card__title {
  color: var(--primary);
}
.tool-card__summary {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tool-card__tooltip {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  padding: 0.6rem 0.75rem;
  background: #1e293b;
  color: #f8fafc;
  font-size: 0.75rem;
  line-height: 1.5;
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
  pointer-events: none;
}
/* 聊天气泡小箭头：尖端朝上，指向卡片 */
.tool-card__tooltip::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 1.5rem;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 6px 6px;
  border-color: transparent transparent #1e293b;
}
.tool-card:hover .tool-card__tooltip {
  display: block;
}
/* 搜索下拉 portal：挂到 body，避免 overflow 裁切；坐标由 JS fixed 写入 */
.tool-card__tooltip--portal {
  display: block;
  right: auto;
}
.tag-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  background: var(--primary-fixed);
  border: 1px solid var(--primary-fixed-dim);
  border-radius: var(--radius-full);
  text-decoration: none;
  color: var(--primary);
  font-size: 0.75rem;
  line-height: 1.4;
}
.tag-badge:hover { background: var(--primary-fixed-dim); }
.tool-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.75rem 0 1rem; }

.category-nav { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.5rem 0 2rem; }
.category-group { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; }
.category-nav a {
  padding: 0.35rem 0.75rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  text-decoration: none;
  color: var(--text);
  font-size: 0.875rem;
}
.category-platform { font-weight: 600; }
.category-child { font-size: 0.8125rem; color: var(--muted); }
.category-nav .count { color: var(--muted); font-weight: 400; font-size: 0.75rem; }

.platform-section { margin-bottom: var(--section-padding); }
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  margin: 0 0 1.5rem;
  padding-bottom: 0;
  border-bottom: none;
}
.section-title-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}
.section-title__icon {
  flex-shrink: 0;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--primary);
}
.section-title {
  font-size: 1.5rem;
  line-height: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--on-surface);
}
.section-more {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: var(--primary);
  text-decoration: none;
  white-space: nowrap;
  font-weight: 500;
  transition: color 0.2s;
}
.section-more:hover {
  color: var(--error);
  text-decoration: none;
}
.section-more__icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
  font-size: 0.875rem;
}
.pagination a { color: var(--primary); text-decoration: none; }
.pagination .disabled { color: var(--muted); }
.pagination-info { color: var(--muted); }

/* ?? ?? ?? */
.search-box { margin-bottom: 1rem; }
.search-box__results { margin-top: 1rem; }
.search-box__status {
  margin: 0.5rem 0;
  color: var(--muted);
  font-size: 0.875rem;
}
.search-box__grid { margin-top: 0; }
.search-box__field {
  position: relative;
  display: block;
  max-width: 480px;
}
.search-box input {
  width: 100%;
  max-width: 480px;
  padding: 0.65rem 2.5rem 0.65rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  font-size: 1rem;
  font-family: inherit;
  background: var(--card);
  color: var(--text);
  /* textfield：去掉 Chromium search 控件（含原生清除叉），改用 .search-box__clear */
  -webkit-appearance: textfield;
  appearance: textfield;
}
/* Hide Chromium native clear; use .search-box__clear for all browsers */
.search-box input[type='search']::-webkit-search-decoration,
.search-box input[type='search']::-webkit-search-cancel-button,
.search-box input[type='search']::-webkit-search-results-button,
.search-box input[type='search']::-webkit-search-results-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}
.search-box__clear {
  position: absolute;
  right: 0.4rem;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--outline);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.search-box__clear:hover,
.search-box__clear:focus-visible {
  color: var(--muted);
  background: var(--surface-container);
  outline: none;
}
.search-box__clear svg {
  width: 1rem;
  height: 1rem;
  display: block;
}
.search-box--topbar {
  position: relative;
  margin: 0;
}
.search-box--topbar .search-box__field {
  max-width: none;
}
.search-box--topbar .search-box__icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.125rem;
  height: 1.125rem;
  color: var(--outline);
  pointer-events: none;
}
.search-box--topbar input {
  width: 16rem;
  max-width: 280px;
  height: 2.25rem;
  padding: 0.5rem 2.25rem 0.5rem 2.5rem;
  font-size: 0.875rem;
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  background: var(--surface-container);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.search-box--topbar .search-box__clear {
  right: 0.35rem;
  width: 1.375rem;
  height: 1.375rem;
}
.search-box--topbar .search-box__clear svg {
  width: 0.875rem;
  height: 0.875rem;
}
.search-box--topbar input:hover {
  border-color: rgba(193, 198, 212, 0.5);
}
.search-box--topbar input:focus {
  outline: none;
  outline-offset: 0;
  background: #fff;
  border-color: var(--primary);
  box-shadow: none;
}
.search-box--topbar input:focus-visible {
  outline: none;
  box-shadow: none;
}
.search-box__dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: min(480px, calc(100vw - var(--sidebar-width) - 2rem));
  max-height: min(420px, 60vh);
  overflow-y: auto;
  padding: 0.75rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  z-index: 20;
}

.btn-primary {
  display: inline-block;
  background: var(--primary);
  color: var(--on-primary);
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-lg);
  text-decoration: none;
  font-weight: 600;
  transition: filter 0.15s ease, transform 0.15s ease;
}
.btn-primary:hover {
  filter: brightness(1.06);
}

/* ?? ?????? ?? */
.home-layout {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}
.home-layout--full .home-body { width: 100%; }
.home-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.home-body-scroll {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--content-bg);
}
.home-body-scroll:focus {
  outline: none;
}
.home-body-scroll:focus-visible {
  outline: none;
}
.home-body-inner {
  flex: 1 0 auto;
  min-height: 0;
}

/* ?? ?? ?? */
.home-top-nav {
  flex-shrink: 0;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  position: relative;
  z-index: 10;
}
.home-top-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 100%;
  padding: 0 2rem 0 0.35rem;
}
.home-top-nav__sidebar-toggle {
  display: none;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: var(--radius-lg);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}
.home-top-nav__sidebar-toggle:hover {
  color: var(--primary);
  background: var(--surface-container);
}
.home-top-nav__sidebar-toggle-icon {
  font-size: 1.375rem;
  line-height: 1;
}
.home-top-nav__links {
  display: flex;
  align-items: stretch;
  gap: 2rem;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior: contain;
  height: 100%;
}
.home-top-nav__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}
.home-top-nav__search {
  flex-shrink: 0;
}
.home-top-nav__link {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  height: auto;
  align-self: stretch;
  padding: 0;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.5;
  border-bottom: none;
  border-radius: 0;
  white-space: nowrap;
  box-shadow: inset 0 -2px 0 transparent;
  transition: color 0.2s, box-shadow 0.2s;
}
.home-top-nav__link:hover { color: var(--primary); }
.home-top-nav__link.active {
  color: var(--primary);
  background: transparent;
  font-weight: 600;
  /* inset ???? overflow-x ??????? */
  box-shadow: inset 0 -2px 0 var(--primary);
}
.home-top-nav__icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: none;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}
.home-top-nav__icon-btn:hover {
  color: var(--primary);
  background: var(--surface-container);
}
.home-top-nav__icon-btn svg {
  width: 1.375rem;
  height: 1.375rem;
}

.home-footer {
  flex-shrink: 0;
  width: 100%;
  margin: 0;
  padding: 2rem 1.5rem 1.25rem;
  border-top: 1px solid var(--outline-variant);
  background: var(--surface-container-low);
  color: var(--on-surface-variant);
}
.home-footer__inner {
  width: 100%;
  max-width: none;
  margin: 0;
}
.home-footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 1.25rem;
}
.home-footer__brand-head {
  margin-bottom: 0.75rem;
}
.home-footer__title {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  /* ????????inline-block + fit-content ??????????? */
}
.home-footer__tagline {
  margin: 0.2rem 0 0;
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 500;
  color: #8a8f9c;
}
.home-footer__desc {
  margin: 0;
  max-width: 20rem;
  font-size: 0.8125rem;
  line-height: 1.5;
}
.home-footer__heading {
  margin: 0 0 0.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--on-surface);
}
.home-footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.8125rem;
}
.home-footer__link {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}
.home-footer__link:hover {
  color: var(--primary);
  text-decoration: none;
}
.home-footer__link.is-active {
  color: var(--primary);
  font-weight: 600;
}
.home-footer__trust {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}
.home-footer__trust-item {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  max-width: 5.5rem;
}
.home-footer__trust-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem;
  border-radius: var(--radius-lg);
  background: #fff;
  border: 1px solid var(--outline-variant);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}
.home-footer__trust-img {
  display: block;
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 0.25rem;
}
.home-footer__trust-caption {
  font-size: 0.625rem;
  line-height: 1.3;
  color: var(--muted);
  text-align: center;
}
.home-footer__bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--outline-variant);
}
.home-footer__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0.75rem;
}
.home-footer__copy,
.home-footer__meta-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--on-surface-variant);
  text-decoration: none;
}
.home-footer__meta-link:hover {
  color: var(--primary);
  text-decoration: none;
}
.home-footer__meta-link .material-symbols-outlined {
  font-size: 0.875rem;
}

/* ??????? ? ?????? ? ?? ? ?? */
@media (max-width: 1023px) {
  .home-footer__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem 0.75rem;
  }
  .home-footer__brand {
    grid-column: 1 / -1;
  }
  .home-footer__desc {
    max-width: none;
  }
  .home-footer__heading {
    font-size: 0.875rem;
    text-align: center;
  }
  .home-footer__links {
    font-size: 0.75rem;
    gap: 0.4rem;
    align-items: center;
  }
  .home-footer__col {
    text-align: center;
  }
  .home-footer__trust {
    grid-column: 1 / -1;
    justify-content: center;
  }
  .home-footer__bottom {
    flex-direction: column;
  }
  .home-footer__meta {
    justify-content: center;
  }
}

@media (min-width: 1024px) {
  .home-footer__grid {
    grid-template-columns: minmax(12rem, 1.6fr) repeat(3, minmax(6rem, 1fr)) auto;
    gap: 1.25rem 1.75rem;
    align-items: start;
  }
  .home-footer__brand {
    grid-column: span 1;
  }
  .home-footer__trust {
    justify-content: flex-end;
    padding-top: 0;
  }
  .home-footer__bottom {
    flex-direction: row;
  }
  .home-footer__meta {
    justify-content: flex-start;
  }
}

/* ?? ?? ?? */
.home-sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: var(--sidebar-bg);
  border: 1px solid var(--sidebar-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
.sidebar-mobile-bar {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.sidebar-menu-toggle {
  display: none;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: var(--radius-lg);
  background: transparent;
  color: var(--sidebar-text);
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}
.sidebar-menu-toggle:hover {
  color: #fff;
  background: var(--sidebar-hover-bg);
}
.sidebar-menu-toggle__icon {
  font-size: 1.5rem;
  line-height: 1;
}
.sidebar-panel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.sidebar-backdrop {
  display: none;
}
.sidebar-brand {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: auto;
  height: auto;
  padding: 1rem 1.5rem 1.5rem;
  border-bottom: none;
  flex-shrink: 0;
  text-decoration: none;
  color: inherit;
}
.sidebar-brand__avatar {
  display: none;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.625rem;
  object-fit: cover;
  flex-shrink: 0;
}
.sidebar-brand__text {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 0;
}
/* ?????????? / ??????????????? background-size:100% ???????????? */
.brand-name-gradient,
.sidebar-brand__name,
.home-footer__title {
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  background-image: linear-gradient(
    110deg,
    #7dd3fc 0%,
    #38bdf8 18%,
    #22d3ee 36%,
    #34d399 52%,
    #fbbf24 70%,
    #fb7185 88%,
    #7dd3fc 100%
  );
  background-size: 100% 100%;
  background-position: 30% 50%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.sidebar-brand__name {
  font-size: 1.5rem;
  line-height: 2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.sidebar-brand__tagline {
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--sidebar-text-muted);
}

.sidebar-action-wrap {
  flex-shrink: 0;
  padding: 0.35rem 0.75rem 0.5rem;
  margin-top: auto;
  border-top: 1px solid var(--sidebar-border);
}
.sidebar-action {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: none;
  border-radius: var(--radius-lg);
  background: transparent;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25;
  transition: color 0.2s, background 0.2s;
}
.sidebar-action:hover {
  color: #fff;
  background: var(--sidebar-hover-bg);
  text-decoration: none;
}
.sidebar-action.is-active {
  color: var(--sidebar-active-text);
  background: var(--sidebar-active-bg);
}
.sidebar-action__icon {
  font-size: 1.25rem;
  line-height: 1;
  color: inherit;
}
.sidebar-action__label {
  white-space: nowrap;
}

.sidebar-nav {
  flex: 1;
  min-height: 0;
  width: 100%;
  border: none;
  border-radius: 0;
  background: transparent;
  padding: 0 0.5rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

/*
 * 侧栏细滚动条（进度条观感）— 见 doc/前台视觉设计.md §3.7
 * - Chromium / Safari：::-webkit-scrollbar 精确约 3px
 * - Firefox 等：隐藏原生条 + .thin-scrollbar 自绘（lib/thinScrollbar.ts）
 */
.sidebar-nav.custom-scrollbar,
.custom-scrollbar {
  --scrollbar-thumb: rgba(255, 255, 255, 0.28);
  --scrollbar-thumb-hover: rgba(255, 255, 255, 0.45);
  --scrollbar-track: transparent;
  --scrollbar-size: 3px;
  position: relative;
}

@supports not selector(::-webkit-scrollbar) {
  .sidebar-nav.custom-scrollbar,
  .custom-scrollbar {
    scrollbar-width: none;
  }
}

.sidebar-nav.custom-scrollbar::-webkit-scrollbar,
.custom-scrollbar::-webkit-scrollbar {
  width: var(--scrollbar-size);
  height: var(--scrollbar-size);
}
.sidebar-nav.custom-scrollbar::-webkit-scrollbar-track,
.custom-scrollbar::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}
.sidebar-nav.custom-scrollbar::-webkit-scrollbar-thumb,
.custom-scrollbar::-webkit-scrollbar-thumb {
  background-color: var(--scrollbar-thumb);
  border-radius: 999px;
  min-height: 2rem;
}
.sidebar-nav.custom-scrollbar::-webkit-scrollbar-thumb:hover,
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background-color: var(--scrollbar-thumb-hover);
}
.sidebar-nav.custom-scrollbar::-webkit-scrollbar-corner,
.custom-scrollbar::-webkit-scrollbar-corner {
  background: transparent;
}

/* Firefox 等自绘细条（由 thinScrollbar.ts 注入） */
.thin-scrollbar {
  position: absolute;
  top: 0;
  right: 1px;
  z-index: 2;
  width: var(--scrollbar-size, 3px);
  pointer-events: auto;
}
.thin-scrollbar[hidden] {
  display: none !important;
}
.thin-scrollbar__thumb {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  border-radius: 999px;
  background: var(--scrollbar-thumb);
  cursor: grab;
  touch-action: none;
  transition: background 0.15s ease;
}
.thin-scrollbar__thumb:hover,
.thin-scrollbar__thumb.is-dragging {
  background: var(--scrollbar-thumb-hover);
}
.thin-scrollbar__thumb.is-dragging {
  cursor: grabbing;
}

.sidebar-group {
  border-bottom: none;
  margin: 0 0.5rem;
}
.sidebar-platform {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem;
  cursor: pointer;
  list-style: none;
  font-weight: 500;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--sidebar-text);
  border-radius: var(--radius-lg);
  transition: color 0.2s, background 0.2s;
}
.sidebar-platform::-webkit-details-marker { display: none; }
.sidebar-platform::marker { content: ""; }
.sidebar-platform:hover {
  color: #fff;
  background: var(--sidebar-hover-bg);
}
.sidebar-group[open] > .sidebar-platform,
.sidebar-group.is-active > .sidebar-platform {
  color: var(--sidebar-active-text);
  background: var(--sidebar-active-bg);
}
.sidebar-platform__label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}
.sidebar-platform__icon {
  flex-shrink: 0;
  font-size: 1.5rem;
  line-height: 1;
  color: inherit;
  transition: color 0.2s;
}
.sidebar-platform:hover .sidebar-platform__icon {
  color: var(--primary-fixed-dim);
}
.sidebar-group[open] > .sidebar-platform .sidebar-platform__icon,
.sidebar-group.is-active > .sidebar-platform .sidebar-platform__icon {
  color: var(--primary-fixed-dim);
}
.sidebar-platform__text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-platform__chevron-hit {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* 热区：箭头起至 summary 右缘，便于展开态点按折叠 */
  width: 1.75rem;
  height: 1.75rem;
  margin: -0.25rem -0.25rem -0.25rem 0;
  border-radius: 0.375rem;
  cursor: pointer;
  color: inherit;
  transition: background 0.2s, color 0.2s;
}
.sidebar-platform__chevron {
  display: block;
  width: 1rem;
  height: 1rem;
  color: inherit;
  opacity: 0.75;
  pointer-events: none;
  transform: rotate(-90deg);
  transition: transform 0.3s ease, opacity 0.2s, color 0.2s;
}
.sidebar-group[open] > .sidebar-platform .sidebar-platform__chevron {
  opacity: 0.9;
  transform: rotate(0deg);
}
/* 与标签区区分：热区自身浅亮底 + 箭头提亮 */
.sidebar-platform__chevron-hit:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}
.sidebar-platform__chevron-hit:hover .sidebar-platform__chevron {
  opacity: 1;
  color: var(--primary-fixed-dim);
}
.sidebar-group[open] > .sidebar-platform .sidebar-platform__chevron-hit:hover,
.sidebar-group.is-active > .sidebar-platform .sidebar-platform__chevron-hit:hover {
  background: rgba(255, 255, 255, 0.2);
}

.sidebar-children {
  list-style: none;
  margin: 0.25rem 0 0.5rem;
  padding: 0 1rem 0 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  animation: sidebar-submenu-in 0.3s ease-in-out;
}
@keyframes sidebar-submenu-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.sidebar-children a {
  display: block;
  padding: 0.5rem 0.75rem;
  color: var(--sidebar-text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  line-height: 1.4;
  border-radius: 0.375rem;
  transition: color 0.2s, background 0.2s;
}
.sidebar-children a:hover {
  color: #fff;
  background: var(--sidebar-hover-bg);
}
.sidebar-children a.active {
  color: var(--sidebar-child-active-text);
  background: var(--sidebar-child-active-bg);
  font-weight: 500;
}

@media (min-width: 1024px) {
  .main--home {
    padding: 0;
  }

  .main--home.container--full {
    max-width: none;
    padding: 0;
    height: 100vh;
    overflow: hidden;
  }

  .main--home .home-layout {
    width: 100%;
    height: 100%;
    gap: 0;
    margin: 0;
  }

  .main--home .home-sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    border-radius: 0;
    border-top: none;
    border-bottom: none;
    border-left: none;
    transition: width 0.22s ease;
  }

  .main--home .home-top-nav__sidebar-toggle {
    display: inline-flex;
  }

  .main--home .home-layout.is-sidebar-collapsed .home-sidebar {
    width: var(--sidebar-width-collapsed);
  }

  .main--home .home-layout.is-sidebar-collapsed .sidebar-brand {
    align-items: center;
    padding: 1rem 0.5rem 0.75rem;
  }

  .main--home .home-layout.is-sidebar-collapsed .sidebar-brand__avatar {
    display: block;
  }

  .main--home .home-layout.is-sidebar-collapsed .sidebar-brand__text {
    display: none;
  }

  .main--home .home-layout.is-sidebar-collapsed .sidebar-nav {
    padding: 0 0.35rem 0.5rem;
    align-items: center;
  }

  .main--home .home-layout.is-sidebar-collapsed .sidebar-group {
    margin: 0;
    width: 100%;
  }

  .main--home .home-layout.is-sidebar-collapsed .sidebar-platform {
    justify-content: center;
    padding: 0.65rem 0.35rem;
  }

  .main--home .home-layout.is-sidebar-collapsed .sidebar-platform__label {
    gap: 0;
    justify-content: center;
  }

  .main--home .home-layout.is-sidebar-collapsed .sidebar-platform__text,
  .main--home .home-layout.is-sidebar-collapsed .sidebar-platform__chevron-hit,
  .main--home .home-layout.is-sidebar-collapsed .sidebar-children {
    display: none;
  }

  .main--home .home-layout.is-sidebar-collapsed .sidebar-action-wrap {
    padding: 0.35rem 0.35rem 0.5rem;
  }

  .main--home .home-layout.is-sidebar-collapsed .sidebar-action {
    justify-content: center;
    padding: 0.5rem 0.25rem;
    gap: 0;
  }

  .main--home .home-layout.is-sidebar-collapsed .sidebar-action__label {
    display: none;
  }

  .main--home .sidebar-nav {
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .main--home .home-body {
    height: 100vh;
    overflow: hidden;
    padding: 0;
  }

  .main--home .home-body-scroll {
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .main--home .home-body-inner {
    padding: 1.5rem 1.5rem 2rem;
  }

  .main--home .home-footer {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

/* ??????????????????????? */
@media (max-width: 1023px) {
  body.is-mobile-nav-open {
    overflow: hidden;
  }

  .main--home {
    padding: 0;
  }

  .main--home.container--full {
    max-width: none;
    padding: 0;
  }

  .home-layout {
    flex-direction: column;
    gap: 0;
  }

  .home-top-nav {
    display: none;
  }

  .home-sidebar {
    --mobile-sidebar-bar-height: 3.75rem; /* 60px @ 16px root */
    position: sticky;
    top: 0;
    z-index: 40;
    width: 100%;
    height: auto;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: none;
    overflow: visible;
    box-shadow: 0 1px 0 var(--sidebar-border);
  }

  .sidebar-mobile-bar {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    height: var(--mobile-sidebar-bar-height);
    min-height: var(--mobile-sidebar-bar-height);
    padding: 0 2.75rem;
    box-sizing: border-box;
  }

  .sidebar-menu-toggle {
    display: inline-flex;
    position: absolute;
    left: 0.35rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 2.25rem;
    height: 2.25rem;
  }

  .sidebar-brand {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 0;
  }

  .sidebar-brand__name {
    font-size: 1.125rem;
    line-height: 1.35rem;
  }

  .sidebar-brand__tagline {
    margin-top: 0.1rem;
    font-size: 0.6875rem;
    line-height: 0.9rem;
  }

  .sidebar-panel {
    position: fixed;
    top: var(--mobile-sidebar-bar-height, 3.75rem);
    left: 0;
    bottom: 0;
    z-index: 50;
    width: min(17.5rem, 86vw);
    background: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    box-shadow: 8px 0 24px rgba(0, 0, 0, 0.2);
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    overflow: hidden;
    visibility: hidden;
    pointer-events: none;
  }

  .home-sidebar.is-mobile-open .sidebar-panel {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
  }

  .sidebar-nav {
    max-height: none;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-top: 0.75rem;
  }

  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 45;
    margin: 0;
    padding: 0;
    border: none;
    background: rgba(15, 23, 42, 0.45);
    cursor: pointer;
  }

  .sidebar-backdrop[hidden] {
    display: none;
  }

  .home-body-inner {
    padding: 1rem var(--layout-padding-x) 1.5rem;
  }

  .home-footer {
    padding-left: var(--layout-padding-x);
    padding-right: var(--layout-padding-x);
  }

  .home-top-nav__inner {
    padding: 0 1rem;
    gap: 0.75rem;
  }

  .home-top-nav__sidebar-toggle {
    display: none !important;
  }

  .home-top-nav__links {
    gap: 1rem;
  }

  .search-box--topbar input {
    width: 10rem;
  }

  .home-top-nav__icon-btn--notify {
    display: none;
  }
}

@media (max-width: 720px) {
  .search-box--topbar {
    display: none;
  }
}

/* ?? ?????? Tab ?? */
.category-tabs { margin-top: 0.25rem; }
.tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: none;
  padding-bottom: 0;
}
.tab {
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--surface-container);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1rem;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.tab:hover {
  background: var(--surface-container-highest);
  color: var(--on-surface);
}
.tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
  box-shadow: 0 1px 4px rgba(0, 92, 177, 0.2);
}
.tab-empty { color: var(--muted); font-size: 0.875rem; margin: 0; }

/* ??????? .tab-bar / .tool-grid ?????????? */
@media (max-width: 1023px) {
  .section-header {
    flex-wrap: nowrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
  }

  .section-title {
    font-size: 1.125rem;
    line-height: 1.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .section-title__icon {
    font-size: 1.25rem;
  }

  .section-more {
    flex-shrink: 0;
    font-size: 0.8125rem;
    white-space: nowrap;
  }

  .tab-bar {
    flex-wrap: wrap;
    overflow-x: visible;
    gap: 0.35rem;
    margin-bottom: 1rem;
    padding-bottom: 0;
  }

  .tab {
    flex-shrink: 1;
    padding: 0.35rem 0.5rem; /* ?????? 1.25rem ???? */
  }

  .tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .tool-card {
    padding: 0.6rem 0.65rem;
    gap: 0.5rem;
    border-radius: var(--radius-lg);
    min-height: 3.75rem; /* ? 60px???????????? */
  }

  .tool-card__icon,
  .tool-card__icon img {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-lg);
  }

  .tool-card__title {
    font-size: 0.8125rem;
    line-height: 1.35;
    margin-bottom: 0.15rem;
  }

  .tool-card__summary {
    font-size: 0.75rem;
    line-height: 1.35;
  }

  .tool-card:hover .tool-card__tooltip,
  .tool-card__tooltip--portal {
    display: none;
  }

  .platform-section {
    margin-bottom: 2rem;
  }
}

/* Unified breadcrumb ? doc/??????.md ?5.5 */
.nav-crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 1.25rem;
  font-size: 0.8125rem;
  color: var(--outline);
}
.nav-crumb a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
}
.nav-crumb a:hover,
.nav-crumb a:focus-visible {
  color: var(--primary);
  text-decoration: none;
}
.nav-crumb__sep {
  opacity: 0.45;
  user-select: none;
}
.nav-crumb__current {
  color: var(--muted);
  font-weight: 500;
}

.list-page-header { margin-bottom: 1.5rem; }
.list-page-title {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
}
.list-page-desc {
  margin: 0 0 0.5rem;
  color: var(--muted);
}
.list-page-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
}

/* ?? ????? /submit ?? ? doc/???????.md */
.submit-page {
  max-width: 45rem;
  padding-bottom: 2rem;
}
.submit-page__header {
  margin-bottom: 0.5rem;
}
.submit-page__title {
  margin: 0 0 1rem;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}
.submit-page__lead {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  color: var(--text);
}
.submit-page__intro {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}
.submit-section {
  margin-top: 2rem;
}
.submit-section__title {
  margin: 0 0 0.85rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
}
.submit-section__body {
  color: var(--muted);
  line-height: 1.7;
}
.submit-principles {
  margin: 0;
  padding-left: 1.25rem;
}
.submit-principles__item {
  margin-bottom: 0.65rem;
}
.submit-principles__item:last-child {
  margin-bottom: 0;
}
.submit-principles__label {
  color: var(--text);
  font-weight: 600;
}
.submit-fields {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.submit-fields__row {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 0.5rem 1rem;
  align-items: start;
}
.submit-fields__label {
  margin: 0;
  font-weight: 600;
  color: var(--text);
  font-size: 0.9375rem;
}
.submit-fields__value {
  margin: 0;
  font-size: 0.9375rem;
}
.submit-fields__text {
  color: var(--text);
}
.submit-fields__hint {
  color: var(--muted);
  font-size: 0.8125rem;
}
.submit-review__p {
  margin: 0 0 0.85rem;
}
.submit-review__p:last-of-type {
  margin-bottom: 1.25rem;
}
.submit-mail {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  padding-top: 0.25rem;
}
.submit-mail__hint {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text);
}
.submit-mail__obfuscated {
  font-weight: 600;
  word-break: break-all;
}
.submit-mail__note {
  color: var(--muted);
  font-size: 0.8125rem;
}
.submit-mail__btn {
  flex-shrink: 0;
}
@media (max-width: 640px) {
  .submit-fields__row {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }
  .submit-page__title {
    font-size: 1.5rem;
  }
}

/* ?? ??????? /{slug} ?? ? doc/?????????.md */
.site-page {
  max-width: 45rem;
  padding-bottom: 2rem;
}
.site-page__header {
  margin-bottom: 1.25rem;
}
.site-page__title {
  margin: 0 0 0.75rem;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}
.site-page__lead {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}
.site-prose {
  color: var(--muted);
  line-height: 1.75;
  font-size: 0.975rem;
}
.site-prose__p {
  margin: 0 0 0.9rem;
}
.site-prose__h2 {
  margin: 1.75rem 0 0.75rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
}
.site-prose__h3 {
  margin: 1.25rem 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}
.site-prose__quote {
  margin: 0 0 1.25rem;
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--primary-fixed-dim);
  background: var(--surface-container);
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.65;
}
.site-prose__ul,
.site-prose__ol {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}
.site-prose__ul li,
.site-prose__ol li {
  margin-bottom: 0.45rem;
}
.site-prose__table-wrap {
  overflow-x: auto;
  margin: 0 0 1.25rem;
}
.site-prose__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.site-prose__table th,
.site-prose__table td {
  border: 1px solid var(--border);
  padding: 0.55rem 0.65rem;
  text-align: left;
  vertical-align: top;
}
.site-prose__table th {
  background: var(--surface-container);
  color: var(--text);
  font-weight: 600;
}
.site-prose__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 0.85rem;
  margin: 1.25rem 0 0.5rem;
  align-items: center;
}
.site-prose__cta-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
}
.site-prose__cta-link:hover {
  text-decoration: underline;
}
.site-prose__cta-link.btn-primary {
  color: var(--on-primary);
  text-decoration: none;
}
.site-prose__cta-link.btn-primary:hover {
  text-decoration: none;
  opacity: 0.92;
}
@media (max-width: 640px) {
  .site-page__title {
    font-size: 1.5rem;
  }
}

/* ?? Articles ?? */
.article-list-page {
  max-width: 52rem;
  padding-bottom: 2.5rem;
}
.article-list-page__header {
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.article-list-page__heading {
  min-width: 0;
}
.article-list-page__title {
  margin: 0 0 0.35rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}
.article-list-page__desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.6;
}
.article-list-page__empty {
  margin: 2.5rem 0;
  padding: 2rem 1.25rem;
  text-align: center;
  color: var(--muted);
  background: var(--surface-container);
  border-radius: var(--radius-xl);
}
.article-cat-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.article-cat-nav__link {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--surface-container);
  color: var(--muted);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1rem;
  transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.article-cat-nav__link:hover {
  background: var(--surface-container-highest);
  color: var(--on-surface);
}
.article-cat-nav__link.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
  box-shadow: 0 1px 4px rgba(0, 92, 177, 0.2);
}
.article-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.article-card {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 0.9rem;
  align-items: center;
  text-decoration: none;
  color: inherit;
  padding: 0.75rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.article-card--no-cover {
  grid-template-columns: 1fr;
}
.article-card:hover {
  border-color: var(--outline-variant);
  box-shadow: 0 4px 16px rgba(25, 28, 34, 0.08);
  transform: translateY(-1px);
}
.article-card:hover .article-card__title {
  color: var(--primary);
}
.article-card__cover {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--surface-container);
  aspect-ratio: 16 / 10;
  align-self: start;
}
.article-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.article-card__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.1rem 0.15rem 0.1rem 0;
}
.article-card__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-card__summary {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-card__meta {
  margin: 0.15rem 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--outline);
}
.article-card__cat {
  color: var(--primary);
  font-weight: 500;
}
.article-card__dot {
  opacity: 0.5;
}
@media (max-width: 640px) {
  .article-card {
    grid-template-columns: 1fr;
  }
  .article-card__cover {
    max-width: 100%;
  }
  .article-list-page__title {
    font-size: 1.35rem;
  }
}

.article-page {
  max-width: 45rem;
  padding-bottom: 3rem;
}
.article-page__crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 1.25rem;
  font-size: 0.8125rem;
  color: var(--outline);
}
.article-page__crumb a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
}
.article-page__crumb a:hover {
  color: var(--primary);
}
.article-page__crumb-sep {
  opacity: 0.45;
  user-select: none;
}
.article-page__header {
  margin-bottom: 1.5rem;
}
.article-page__title {
  margin: 0 0 0.75rem;
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.28;
  letter-spacing: -0.02em;
}
.article-page__lead {
  margin: 0 0 0.85rem;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}
.article-page__meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}
.article-page__meta {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--outline);
}
.article-page__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.article-page__cover {
  margin: 0 0 1.75rem;
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--surface-container);
}
.article-page__cover img {
  width: 100%;
  height: auto;
  display: block;
}

.article-prose,
.tool-prose {
  color: var(--on-surface-variant);
  line-height: 1.8;
  font-size: 1rem;
}
.article-prose > :first-child,
.tool-prose > :first-child {
  margin-top: 0;
}
.article-prose h2,
.tool-prose h2 {
  margin: 2rem 0 0.85rem;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.35;
}
.article-prose h3,
.tool-prose h3 {
  margin: 1.5rem 0 0.6rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
}
.article-prose h4,
.tool-prose h4 {
  margin: 1.25rem 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}
.article-prose p,
.tool-prose p {
  margin: 0 0 1rem;
}
/* 中文文章正文：直接子段落首行缩进两字；不作用于 .tool-prose / 引用块 / 列表内 p */
.article-prose > p {
  text-indent: 2em;
}
.article-prose ul,
.tool-prose ul,
.article-prose ol,
.tool-prose ol {
  margin: 0 0 1.1rem;
  padding-left: 1.35rem;
}
.article-prose li,
.tool-prose li {
  margin-bottom: 0.45rem;
}
.article-prose a,
.tool-prose a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}
.article-prose a:hover,
.tool-prose a:hover {
  text-decoration: underline;
}
.article-prose blockquote,
.tool-prose blockquote {
  margin: 0 0 1.35rem;
  padding: 0.85rem 1.1rem;
  border-left: 3px solid var(--primary);
  background: var(--surface-container);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  color: var(--muted);
}
.article-prose img,
.tool-prose img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  margin: 0.65rem 0 1.15rem;
  border: 1px solid var(--border);
}
.article-prose table,
.tool-prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  margin: 0 0 1.35rem;
}
.article-prose th,
.tool-prose th,
.article-prose td,
.tool-prose td {
  border: 1px solid var(--border);
  padding: 0.55rem 0.7rem;
  text-align: left;
}
.article-prose th,
.tool-prose th {
  background: var(--surface-container);
  color: var(--text);
  font-weight: 600;
}
.article-prose code,
.tool-prose code {
  font-size: 0.9em;
  padding: 0.12em 0.4em;
  background: var(--surface-container);
  border-radius: 4px;
  color: var(--text);
}
.article-prose pre,
.tool-prose pre {
  overflow-x: auto;
  padding: 0.95rem 1.1rem;
  margin: 0 0 1.35rem;
  background: var(--surface-container);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.article-prose pre code,
.tool-prose pre code {
  padding: 0;
  background: none;
}
.article-prose hr,
.tool-prose hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.75rem 0;
}

/* Tool detail ? see doc/?????????.md; crumb uses .nav-crumb */
.tool-page {
  max-width: 45rem;
  padding-bottom: 3rem;
}
.tool-hero {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  margin-bottom: 1.75rem;
}
/* 网页截图槽：4:3 约束，object-fit:contain；可点击打开灯箱（见前台工具详情页设计 §2.2–2.3） */
.tool-hero__shot {
  flex-shrink: 0;
  width: 240px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--surface-container);
  padding: 0;
  margin: 0;
  cursor: zoom-in;
  display: block;
  font: inherit;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.tool-hero__shot:hover,
.tool-hero__shot:focus-visible {
  border-color: var(--primary-fixed-dim);
  box-shadow: 0 0 0 2px var(--primary-fixed);
  outline: none;
}
.tool-hero__shot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  pointer-events: none;
}

/* 截图灯箱 */
.tool-shot-lb {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 2.5rem 1.25rem 1.25rem;
  background: rgba(25, 28, 34, 0.72);
  cursor: zoom-out;
}
.tool-shot-lb__close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius-lg);
  background: rgba(25, 28, 34, 0.55);
  color: #fff;
  cursor: pointer;
}
.tool-shot-lb__close:hover,
.tool-shot-lb__close:focus-visible {
  background: rgba(25, 28, 34, 0.8);
  outline: none;
}
.tool-shot-lb__close .material-symbols-outlined {
  font-size: 1.35rem;
  line-height: 1;
}
.tool-shot-lb__stage {
  max-width: min(96vw, 1200px);
  max-height: min(90vh, 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
}
.tool-shot-lb__img {
  display: block;
  max-width: 100%;
  max-height: min(90vh, 100%);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-xl);
  background: var(--surface-lowest);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.tool-hero__body {
  flex: 1;
  min-width: 0;
}
.tool-hero__title {
  margin: 0 0 0.35rem;
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.28;
  letter-spacing: -0.02em;
}
.tool-hero__subtitle {
  margin: 0 0 0.65rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.45;
}
.tool-hero__summary {
  margin: 0 0 0.85rem;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}
.tool-hero__tags {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 1rem;
  /* 裁切绝对定位测量层的横向溢出，避免窄屏撑出 scrollWidth（见 doc 工具详情 §2.4） */
  overflow-x: hidden;
  overflow-x: clip;
}
.tool-hero__tags .tag-badge {
  background: transparent;
  border-color: var(--border);
  color: var(--muted);
  border-radius: var(--radius-lg);
}
.tool-hero__tags .tag-badge:hover {
  background: var(--surface-container);
  border-color: var(--primary-fixed-dim);
  color: var(--primary);
}
/* 离屏测量：算「一整行」能放下几枚标签 + 「+N 更多」；border box 不得撑宽文档 */
.tool-hero__tags-measure {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  max-width: 100%;
  height: 0;
  overflow: hidden;
  visibility: hidden;
  pointer-events: none;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: inherit;
  white-space: nowrap;
}
.tool-hero__tags-measure .tag-badge,
.tool-hero__tags-measure .tool-hero__tags-more-btn {
  flex-shrink: 0;
}
.tool-hero__tags-more-btn {
  flex-shrink: 0;
  margin: 0;
  padding: 0.15rem 0.5rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  background: transparent;
  color: var(--outline);
  font: inherit;
  font-size: 0.75rem;
  line-height: 1.4;
  cursor: pointer;
  user-select: none;
}
.tool-hero__tags-more-btn:hover,
.tool-hero__tags-more-btn:focus-visible {
  color: var(--primary);
  border-color: var(--primary-fixed-dim);
  outline: none;
}
.tool-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin: 0;
}
.tool-scan-qr {
  position: relative;
  display: inline-flex;
}
.tool-scan-qr__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0.6rem 1.2rem;
  border: 1px solid var(--primary);
  border-radius: var(--radius-lg);
  background: transparent;
  color: var(--primary);
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
  cursor: pointer;
  text-decoration: none;
  transition: filter 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.tool-scan-qr__btn:hover,
.tool-scan-qr.is-open .tool-scan-qr__btn,
.tool-scan-qr__btn:focus-visible {
  background: var(--primary);
  color: var(--on-primary);
  filter: brightness(1.06);
  outline: none;
}
.tool-scan-qr__btn .material-symbols-outlined {
  font-size: 1.25rem;
  line-height: 1;
}
.tool-scan-qr__pop {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  z-index: 40;
  min-width: 11.5rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface-lowest);
  box-shadow: 0 8px 24px rgba(25, 28, 34, 0.12);
  text-align: center;
}
.tool-scan-qr__img {
  display: block;
  width: 160px;
  height: 160px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  background: var(--surface-container);
}
.tool-scan-qr__hint {
  margin: 0.5rem 0 0;
  color: var(--outline);
  font-size: 0.75rem;
  line-height: 1.4;
}
.tool-section {
  margin-bottom: 1.75rem;
}
.tool-section__title {
  margin: 0 0 0.85rem;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.35;
}
.tool-section__body {
  margin: 0;
}
.tool-contact {
  margin-top: 0.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.tool-contact__list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.55rem 1rem;
  margin: 0;
  font-size: 0.9375rem;
}
.tool-contact__list dt {
  margin: 0;
  color: var(--outline);
  font-weight: 600;
}
.tool-contact__list dd {
  margin: 0;
  color: var(--muted);
}
.tool-contact__list a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}
.tool-contact__list a:hover {
  text-decoration: underline;
}
@media (max-width: 640px) {
  .article-page__title,
  .tool-hero__title {
    font-size: 1.5rem;
  }
  .tool-hero {
    flex-direction: column;
    align-items: stretch;
  }
  /* 截图独占一整行，避免左侧一小块、右侧留白导致不整齐；电脑端仍为 240px 横排 */
  .tool-hero__shot {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  /* 手机已在详情页，无需扫码入口 */
  .tool-scan-qr {
    display: none;
  }
  /* 窄屏仅余「访问官网」，靠右；电脑端 actions 仍默认左起横排 */
  .tool-hero__actions {
    justify-content: flex-end;
  }
  /* 截图灯箱：窄屏全屏舞台；近不透明遮罩压住背后顶栏/正文；不改电脑端规则 */
  .tool-shot-lb {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    height: 100dvh;
    max-height: 100dvh;
    padding-top: max(3.25rem, calc(env(safe-area-inset-top, 0px) + 2.75rem));
    padding-right: max(0.5rem, env(safe-area-inset-right, 0px));
    padding-bottom: max(0.5rem, env(safe-area-inset-bottom, 0px));
    padding-left: max(0.5rem, env(safe-area-inset-left, 0px));
    background: rgba(12, 14, 18, 0.96);
    overscroll-behavior: none;
  }
  .tool-shot-lb__close {
    top: max(0.5rem, env(safe-area-inset-top, 0px));
    right: max(0.5rem, env(safe-area-inset-right, 0px));
    width: 2.75rem;
    height: 2.75rem;
    background: rgba(15, 18, 24, 0.72);
  }
  .tool-shot-lb__stage {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    min-height: 0;
    max-width: none;
    max-height: none;
  }
  .tool-shot-lb__img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    border-radius: var(--radius-md);
    box-shadow: none;
    background: transparent;
  }
}

/* ========== 右侧挂件 SideDock + 右侧内容暗色（doc/前台右侧挂件设计.md） ========== */
.side-dock {
  position: fixed;
  right: max(1.25rem, env(safe-area-inset-right, 0px));
  bottom: max(1.5rem, env(safe-area-inset-bottom, 0px));
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.side-dock__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #ededed;
  color: #333333;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.side-dock__btn:hover,
.side-dock__btn:focus-visible {
  background: #e0e0e0;
  color: #1a1a1a;
  outline: none;
}
.side-dock__icon {
  width: 1.35rem;
  height: 1.35rem;
  display: block;
}
.side-dock__wechat {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.side-dock__pop {
  position: absolute;
  right: calc(100% + 0.65rem);
  bottom: 0;
  z-index: 51;
  min-width: 11.5rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface-lowest);
  box-shadow: 0 8px 24px rgba(25, 28, 34, 0.12);
  text-align: center;
}
.side-dock__qr {
  display: block;
  width: 160px;
  height: 160px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  background: var(--surface-container);
  object-fit: contain;
}
.side-dock__hint {
  margin: 0.5rem 0 0;
  color: var(--outline);
  font-size: 0.75rem;
  line-height: 1.4;
}

/* 仅右侧 .home-body 暗色；侧栏 --sidebar-* 不受影响 */
.home-body[data-content-theme="dark"] {
  --content-bg: #1a1c20;
  --card: #252830;
  --surface-lowest: #252830;
  --surface: #1e2128;
  --surface-container: #2a2e36;
  --surface-container-low: #22252b;
  --surface-container-high: #343842;
  --surface-container-highest: #3d434e;
  --text: #e8eaed;
  --on-surface: #e8eaed;
  --muted: #9aa0a6;
  --on-surface-variant: #9aa0a6;
  --border: #3d434e;
  --border-subtle: #3d434e;
  --outline: #8b919a;
  --outline-variant: #5c6370;
  color: var(--text);
}
.home-body[data-content-theme="dark"] .home-top-nav {
  background: rgba(26, 28, 32, 0.92);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.28);
}
/* 搜索框：底略亮于顶栏，文字/占位与底色明显区分 */
.home-body[data-content-theme="dark"] .search-box--topbar input {
  background: var(--surface-container-high);
  color: var(--text);
  border-color: transparent;
}
.home-body[data-content-theme="dark"] .search-box--topbar input::placeholder {
  color: var(--muted);
  opacity: 1;
}
.home-body[data-content-theme="dark"] .search-box--topbar input:hover {
  border-color: var(--outline-variant);
}
.home-body[data-content-theme="dark"] .search-box--topbar input:focus {
  background: var(--surface-container-highest);
  color: var(--text);
  border-color: var(--primary);
}
.home-body[data-content-theme="dark"] .search-box--topbar .search-box__icon {
  color: var(--muted);
}
.home-body[data-content-theme="dark"] .home-footer__trust-frame {
  background: var(--surface-lowest);
}
.home-body[data-content-theme="dark"] .side-dock__btn {
  background: #3a3f48;
  color: #e8eaed;
}
.home-body[data-content-theme="dark"] .side-dock__btn:hover,
.home-body[data-content-theme="dark"] .side-dock__btn:focus-visible {
  background: #4a505c;
  color: #ffffff;
}

@media (max-width: 1023px) {
  .side-dock {
    right: max(0.85rem, env(safe-area-inset-right, 0px));
    bottom: max(1.1rem, env(safe-area-inset-bottom, 0px));
  }
  .side-dock__btn {
    width: 2.5rem;
    height: 2.5rem;
  }
}
