/*
Theme Name: Aoyii Redesign
Theme URI: https://www.aoyii.com
Description: aoyii.com 2026 改版子主题（Astra 子主题）。设计体系：AI奥义 · 发现 AI（.design-handoff-2026-09-02/handoff/design-system/）。阶段 1：全局骨架（导航/页脚/面包屑/页头渐变带/自托管字体）。
Author: Kai
Author URI: https://www.aoyii.com
Template: astra
Version: 0.1.1
Text Domain: aoyii-redesign
*/

/* =============================================
   AI奥义 · 发现 AI — Design Tokens
   来源：handoff/design-system/tokens.css（唯一权威，勿手改）
   ============================================= */
:root {
  /* ── Semantic brand palette ── */
  --brand-bg:              #ffffff;
  --brand-surface:         #f7f8fa;
  --brand-fg:              #111111;
  --brand-muted:           #6b7280;
  --brand-border:          #d9dee7;
  --brand-accent:          #1677ff;
  --brand-accent-secondary:#7c5cf5;
  --brand-accent-deep:     #0a1f3c;
  --brand-accent-cyan:     #3cdcf4;

  /* ── Primary (accent) scale ── */
  --brand-color-primary:              #1677ff;
  --brand-color-primary-bg:           #e6f4ff;
  --brand-color-primary-bg-hover:     #bae0ff;
  --brand-color-primary-border:       #91caff;
  --brand-color-primary-border-hover: #69b1ff;
  --brand-color-primary-hover:        #4096ff;
  --brand-color-primary-active:       #0958d9;
  --brand-color-primary-text:         #002c8c;

  /* ── Status ── */
  --brand-color-success:    #52c41a;
  --brand-color-warning:    #faad14;
  --brand-color-error:      #ff4d4f;
  --brand-color-info:       #1677ff;

  /* ── Link (accent-secondary) ── */
  --brand-color-link:          #7c5cf5;
  --brand-color-link-hover:    #a68aff;
  --brand-color-link-active:   #5c44cf;

  /* ── Neutral text ── */
  --brand-color-text:            #2e2e2e;
  --brand-color-text-secondary:  #646464;
  --brand-color-text-tertiary:   #949494;

  /* ── Neutral fill ── */
  --brand-color-fill:            #dbdbdb;
  --brand-color-fill-secondary:  #f1f1f1;
  --brand-color-fill-tertiary:   #f5f5f5;

  /* ── Layout bg ── */
  --brand-color-bg-layout:    #f5f5f5;
  --brand-color-bg-container: #ffffff;
  --brand-color-bg-elevated:  #ffffff;

  /* ── Typography ── */
  --brand-font-family: 'SourceHanSansCN Bold', system-ui, sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
  --brand-font-family-code: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
  --brand-font-size:           14px;
  --brand-font-size-sm:        12px;
  --brand-font-size-lg:        18px;
  --brand-font-size-xl:        22px;
  --brand-font-size-heading-1: 38px;
  --brand-font-size-heading-2: 32px;
  --brand-font-size-heading-3: 26px;
  --brand-font-size-heading-4: 22px;
  --brand-font-size-heading-5: 18px;
  --brand-line-height:         1.57;
  --brand-line-height-heading: 1.25;
  --brand-font-weight-strong:  600;

  /* ── Spacing & sizing ── */
  --brand-size-xxs: 4px;
  --brand-size-xs:  8px;
  --brand-size-sm:  12px;
  --brand-size:     16px;
  --brand-size-md:  20px;
  --brand-size-lg:  24px;
  --brand-size-xl:  32px;
  --brand-size-xxl: 48px;

  /* ── Radius & borders ── */
  --brand-border-radius-xs: 3px;
  --brand-border-radius-sm: 5px;
  --brand-border-radius:    8px;
  --brand-border-radius-lg: 10px;
  --brand-line-width:       1px;
  --brand-control-height:   44px;

  /* ── Motion ── */
  --brand-motion-duration-fast: 0.1s;
  --brand-motion-duration-mid:  0.2s;
  --brand-motion-duration-slow: 0.3s;
  --brand-motion-ease-in-out: cubic-bezier(0.645, 0.045, 0.355, 1);
  --brand-motion-ease-out:    cubic-bezier(0.215, 0.61, 0.355, 1);

  /* ── Icons ── */
  --brand-icon-size-sm:  16px;
  --brand-icon-size:     20px;
  --brand-icon-size-md:  24px;
  --brand-icon-size-lg:  32px;
  --brand-icon-stroke:   1.5px;

  /* ── Brand gradients ── */
  --brand-gradient-hero: linear-gradient(135deg, #0a1f3c, #3cdcf4);
  --brand-gradient-logo: linear-gradient(135deg, #1677ff, #3cdcf4, #7c5cf5);
}

/* =============================================
   骨架组件短别名（参照页 :root 用法，指向 brand tokens）
   ============================================= */
:root {
  --bg:              var(--brand-bg);
  --surface:         var(--brand-surface);
  --fg:              var(--brand-fg);
  --muted:           var(--brand-muted);
  --border:          var(--brand-border);
  --accent:          var(--brand-accent);
  --accent-secondary:var(--brand-accent-secondary);
  --radius:          var(--brand-border-radius);
  --grid:            var(--brand-size-xs);
  --font:            "Inter", "Source Han Sans CN", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  --container:       1200px;
}

/* =============================================
   全局骨架（阶段 1）
   视觉基准：.design-handoff-2026-09-02/ 参照页（21 个静态 HTML）
   覆盖范围：body 字体/颜色、导航、面包屑、页头渐变带、页脚、回到顶部
   内容区模板（front-page/分类/详情）阶段 2-3 逐页接管
   ============================================= */

/* ===== Body 基础（自托管 Inter + 系统中文字体栈） ===== */
body {
  font-family: var(--font);
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* ===== Focus Visible（无障碍硬约束） ===== */
.nav-wrap a:focus-visible,
.nav-wrap button:focus-visible,
.footer a:focus-visible,
.footer button:focus-visible,
.crumbs a:focus-visible,
.page-head a:focus-visible,
.scroll-top:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ===== Skip Link ===== */
.skip-link {
  position: fixed;
  top: -48px;
  left: 16px;
  z-index: 200;
  height: 40px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--bg);
  background: var(--fg);
  border-radius: var(--radius);
  transition: top 0.15s;
}
.skip-link:focus-visible { top: 12px; }

/* ===== 吸顶毛玻璃导航 ===== */
.nav-wrap {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: 56px;
}
.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  height: 100%;
  gap: 32px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 18px;
  white-space: nowrap;
  color: var(--fg);
}
.nav-logo img {
  width: 32px;
  height: 32px;
  border-radius: 6px;
}
.nav-wrap .nav-links {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-wrap .nav-links::-webkit-scrollbar { display: none; }
.nav-wrap .nav-links a {
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  border-radius: 6px;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}
.nav-wrap .nav-links a:hover {
  color: var(--fg);
  background: var(--surface);
}
.nav-wrap .nav-links a.active {
  color: var(--accent);
  background: rgba(22, 119, 255, 0.06);
}
.nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.nav-search-btn:hover {
  color: var(--fg);
  background: var(--bg);
  border-color: #c0c5cf;
}
.nav-submit {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--bg);
  background: var(--accent);
  border-radius: var(--radius);
  transition: background 0.15s;
  white-space: nowrap;
}
.nav-submit:hover { background: var(--brand-color-primary-active); }
.nav-submit-link { display: none; }
.nav-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  color: var(--fg);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
  transition: background 0.15s, border-color 0.15s;
}
.nav-menu-btn:hover {
  background: var(--bg);
  border-color: #c0c5cf;
}
.nav-menu-btn .icon-close { display: none; }
.nav-wrap.menu-open .nav-menu-btn .icon-open { display: none; }
.nav-wrap.menu-open .nav-menu-btn .icon-close { display: block; }

/* ===== 语言切换（Polylang，功能沿用现站） ===== */
.lang-switch { position: relative; }
.lang-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--fg);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: background 0.15s, border-color 0.15s;
}
.lang-trigger:hover,
.lang-trigger:focus-visible,
.lang-trigger[aria-expanded="true"] {
  /* 显式保持文字色：Astra 的 button:hover{color:#fff} 特异性更高，
     会把按钮文字刷成白色叠在白底上（hover 空白问题） */
  color: var(--fg);
}
.lang-trigger:hover {
  background: var(--bg);
  border-color: #c0c5cf;
}
.lang-trigger:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.lang-trigger[aria-expanded="true"] {
  background: var(--bg);
  border-color: #c0c5cf;
}
.lang-trigger[aria-expanded="true"] .lang-chevron { transform: rotate(180deg); }
.lang-chevron { transition: transform 0.15s; }
.lang-globe { flex-shrink: 0; }
.lang-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 148px;
  padding: 4px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(17, 17, 17, 0.10);
  z-index: 110;
}
.lang-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}
.lang-item:hover {
  color: var(--fg);
  background: var(--surface);
}
.lang-item.current { color: var(--fg); }
.lang-item.current svg { color: var(--fg); }
.lang-item .lang-check { display: none; }
.lang-item.current .lang-check { display: block; }

/* ===== 面包屑 ===== */
.crumbs {
  max-width: var(--container);
  margin: 0 auto;
  padding: 20px 24px 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}
.crumbs a { transition: color 0.15s; }
.crumbs a:hover { color: var(--fg); }
.crumbs [aria-current="page"] { color: var(--fg); font-weight: 600; }

/* ===== 页头渐变带（品牌淡渐变，仅此带 + logo 圆可用渐变） ===== */
.page-head {
  /* 统一宽度: 视觉带 1152 (= --container - 48), 与 hero/tool-grid 全站对齐 */
  max-width: calc(var(--container) - 48px);
  width: calc(100% - 48px);
  margin: 24px auto 0;
  padding: 28px 32px 26px;
  background: linear-gradient(135deg, rgba(22, 119, 255, 0.08) 0%, rgba(124, 92, 245, 0.08) 100%);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.page-head h1 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.25;
}
.page-head h1 .grad {
  background: linear-gradient(92deg, var(--accent) 0%, var(--accent-secondary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--accent);
}
.page-head p {
  margin-top: 8px;
  font-size: 15px;
  color: var(--muted);
  max-width: 560px;
  text-wrap: balance;
}

/* ===== taxonomy 模板：page-head 在带内边距容器内，取消自内缩（全断点） ===== */
.taxonomy-wrap .page-head,
.content-layout .page-head {
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}
/* 容器已带内边距, 搜索栏取消页边距收缩 */
.taxonomy-wrap .channel-search,
.content-layout .channel-search {
  width: 100%;
}
/* 容器已带内边距, section 取消横向内缩(否则网格比 page-head 每边再窄 24px) */
.taxonomy-wrap .section,
.content-layout .section {
  padding-left: 0;
  padding-right: 0;
}
/* 容器已带内边距, 面包屑取消自带 24px 左右内边距(否则文字缩进 48px) */
.taxonomy-wrap .crumbs,
.content-layout .crumbs {
  padding-left: 0;
  padding-right: 0;
}

/* ===== 手机端对齐：page-head 与搜索栏统一 24px 页边距 ===== */
/* taxonomy 模板 page-head 在带内边距容器内无自内缩(见下方覆盖)；
   此处把两种模板的 page-head / channel-search 统一到相同可视宽度 */
@media (max-width: 768px) {
  .taxonomy-wrap .page-head { width: 100%; margin-left: 0; margin-right: 0; }
  .channel-search { width: calc(100% - 48px); margin-left: auto; margin-right: auto; max-width: calc(var(--container) - 48px); }
}

/* ===== 筛选胶囊容器（阶段 2 分类模板复用；移动端横向滚动） ===== */
.aoyii-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ===== 页脚 ===== */
.footer {
  margin-top: 40px;
  padding: 24px;
  border-top: 1px solid var(--border);
}
.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
}
.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-links a { transition: color 0.15s; }
.footer-links a:hover { color: var(--fg); }
.beian-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.beian-item svg { flex-shrink: 0; }
/* 备案信息弱化：可见但不引人注意（合规可见性优先于 hover 提亮） */
.footer-links a[href*="beian."] {
  color: var(--muted);
  opacity: 0.6;
  transition: opacity 0.15s;
}
.footer-links a[href*="beian."]:hover { color: var(--muted); opacity: 0.9; }

/* ===== 触控热区扩展（≥44px 硬约束） ===== */
.nav-search-btn, .lang-trigger, .nav-menu-btn { position: relative; }
.nav-search-btn::after, .lang-trigger::after, .nav-menu-btn::after {
  content: "";
  position: absolute;
  inset: -4px;
}
.scroll-top::after { content: ""; position: absolute; inset: -2px; }

/* ===== Reduced Motion（硬约束） ===== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .nav-wrap *, .footer *, .lang-switch *, .scroll-top { transition: none !important; }
}

/* ===== 回到顶部 ===== */
.scroll-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 50;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.scroll-top.visible { opacity: 1; visibility: visible; pointer-events: auto; }
.scroll-top:hover { background: var(--brand-color-primary-active); }

/* =============================================
   响应式（参照页逐档；内容栅格断点 820/560 由阶段 2 模板使用）
   768px：导航切汉堡（全宽下拉）
   480px：隐藏 logo 文本
   ============================================= */
@media (max-width: 768px) {
  .nav-menu-btn { display: inline-flex; }
  .nav-submit { display: none; }
  .nav-submit-link { display: flex; align-items: center; min-height: 44px; }
  .nav-wrap .nav-links {
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 2px;
    padding: 8px 16px 12px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 12px 24px rgba(17, 17, 17, 0.08);
    overflow: visible;
    z-index: 99;
  }
  .nav-wrap.menu-open .nav-links { display: flex; }
  .nav-wrap .nav-links a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 8px 10px;
    font-size: 15px;
  }
  .page-head h1 { font-size: 26px; }
  .aoyii-pills {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .aoyii-pills::-webkit-scrollbar { display: none; }
}
@media (max-width: 480px) {
  .nav-inner { gap: 16px; padding: 0 16px; }
  .nav-wrap .nav-links a { padding: 6px 10px; }
  .nav-logo-text { display: none; }
  .page-head { margin-top: 16px; padding: 20px 20px 18px; }
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* =============================================
   首页组件（T-250）
   视觉基准：.design-handoff-2026-09-02/aoyii-homepage.html
   Hero / 分类版块 + 工具卡片网格 / 分类云 / CTA 引导条
   红线：旧蓝 #1677ff / #1677ff 禁用，一律 --brand-accent #1677ff
   （参照页 .hero 底色 rgba(37,99,235,.06) 已换 rgba(22,119,255,.06)）
   ============================================= */

/* ===== Hero ===== */
.hero {
  /* 统一宽度: 背景带收窄到内容区 1152 (= --container 1200 - 48), 与搜索框/TOPAI 内容对齐 */
  max-width: calc(var(--container) - 48px);
  width: calc(100% - 48px);
  margin: 24px auto 20px;
  padding: 48px 32px 36px;
  text-align: center;
  background: rgba(22, 119, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: rgba(22, 119, 255, 0.10);
  border: 1px solid rgba(22, 119, 255, 0.18);
  border-radius: 20px;
  margin-bottom: 16px;
}
.hero h1 {
  font-size: 40px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}
.hero h1 span { color: var(--accent-secondary); }
.hero p {
  font-size: 16px;
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto 28px;
  line-height: 1.5;
  text-wrap: balance;
}

/* ===== Hero 搜索框（GET ?s=，行为同现站） ===== */
.hero-search {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 100%;
  max-width: 560px;
}
.hero-search input {
  width: 100%;
  height: 48px;
  padding: 0 48px 0 20px;
  -webkit-appearance: none;
  appearance: none;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  font: inherit;
  font-size: 15px;
  color: var(--fg);
  outline: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.hero-search input::placeholder { color: var(--muted); }
.hero-search input:focus {
  border-color: var(--accent);
  box-shadow: 0 2px 12px rgba(22, 119, 255, 0.12);
}
.hero-search button {
  position: absolute;
  right: 6px;
  width: 36px;
  height: 36px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  transition: background 0.15s;
}
.hero-search button:hover { background: var(--brand-color-primary-active); }

/* ===== Hero 热门搜索词 ===== */
.hero-hot {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-size: 13px;
  color: var(--muted);
}
.hero-hot-word {
  font: inherit;
  color: var(--muted);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  position: relative;
  transition: color 0.15s;
}
.hero-hot-word::after { content: ""; position: absolute; inset: -4px; }
.hero-hot-word:hover { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }

/* ===== 分类版块 ===== */
.section {
  max-width: var(--container);
  margin: 0 auto;
  padding: 24px 24px 16px;
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
}
.section-head h2 {
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-head h2 .icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--muted);
}
.section-head h2 .icon svg { width: 100%; height: 100%; display: block; }
.section-more {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.15s;
}
.section-more:hover { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }

/* ===== 首页 Skill 卡片（对齐 tool-card 气质） ===== */
.home-skill-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}
.home-skill-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
  position: relative;
}
.home-skill-card:hover {
  background: var(--bg);
  border-color: var(--fg);
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.home-skill-icon {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--fg);
}
.home-skill-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.home-skill-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.home-skill-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.home-skill-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--muted);
}
.home-article-grid {
  margin-top: 0;
}
@media (max-width: 1024px) {
  .home-skill-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 768px) {
  .home-skill-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 480px) {
  .home-skill-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===== 工具卡片网格（5 → 4 → 3 → 2 列） ===== */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}
.tool-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
  cursor: pointer;
}
.tool-card:hover {
  background: var(--bg);
  border-color: #c0c5cf;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.tool-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.tool-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
}
.tool-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.tool-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.tool-name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--fg);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 2px;
}
.tool-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* 分类标签（任务要求的弱化标签，参照页未含） */
.tool-cat {
  margin-top: 4px;
  align-self: flex-start;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1px 8px;
}
/* .tool-cat 卡片分类标签已按 2026-09-04 需求移除（模板不再输出，保留类名防遗留引用） */

/* ===== 分类云（置于 8 个版块之后） ===== */
.cat-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cloud-tag {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.cloud-tag:hover {
  color: var(--fg);
  border-color: #c0c5cf;
  background: var(--surface);
}
.cloud-group + .cloud-group { margin-top: 16px; }
.cloud-group-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 10px;
}

/* ===== CTA 引导条 ===== */
.cta-banner {
  margin: 32px auto 0;
  max-width: var(--container);
  padding: 0 24px;
}
.cta-inner {
  padding: 32px 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.cta-inner h2 {
  font-size: 20px;
  font-weight: 700;
}
.cta-inner p {
  font-size: 15px;
  color: var(--muted);
  margin-top: 4px;
}
.cta-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 24px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border-radius: var(--radius);
  transition: background 0.15s;
}
.cta-btn:hover { background: var(--brand-color-primary-active); }

/* ===== 首页 Focus Visible / 触控热区（并入骨架约束体系） ===== */
.hero-search input:focus-visible,
.tool-card:focus-visible,
.cloud-tag:focus-visible,
.section-more:focus-visible,
.cta-btn:focus-visible,
.hero-hot-word:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.tool-card:focus-visible { outline-offset: -2px; }
.cloud-tag, .section-more, .cta-btn, .hero-hot-word { position: relative; }
.cloud-tag::after, .section-more::after, .cta-btn::after, .hero-hot-word::after {
  content: "";
  position: absolute;
  inset: -4px;
}

/* ===== 首页 Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
  .hero *, .tool-card, .cloud-tag, .cta-btn, .section-more, .hero-hot-word {
    transition: none !important;
  }
}

/* ===== 首页响应式 ===== */
@media (max-width: 1024px) {
  .tool-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 768px) {
  .tool-grid { grid-template-columns: repeat(3, 1fr); }
  .hero h1 { font-size: 28px; }
  .hero p { font-size: 14px; }
  .hero { width: calc(100% - 32px); padding: 32px 16px 28px; }
  .section { padding: 20px 16px 12px; }
  .cta-inner { flex-direction: column; text-align: center; }
  .cta-banner { padding: 0 16px; }
}
@media (max-width: 480px) {
  .tool-grid { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 24px; }
}

/* ============================================================
   工具详情页样式（移植自 astra-child，视觉层无改动）
   标记：AOYII_RD_TOOL_DETAIL_PORT
   ============================================================ */
/* ---- Tool Detail ---- */
.tool-detail-page {
    padding: 30px 0;
}
.tool-detail-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 30px;
}
.tool-icon {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: var(--aoyii-radius-lg);
    overflow: hidden;
    background: var(--aoyii-surface-hover);
}
.tool-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.tool-icon-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}
.tool-header-info {
    flex: 1;
}
.tool-title {
    font-size: var(--aoyii-fs-h2);
    margin: 0 0 6px;
}
.tool-categories {
    font-size: 13px;
    margin-bottom: 6px;
}
.tool-cat-badge {
    color: var(--aoyii-primary);
    text-decoration: none;
}
.tool-cat-badge:hover {
    color: var(--aoyii-primary-dark);
}
.tool-meta {
    font-size: 13px;
    color: var(--aoyii-text-secondary);
}
.tool-meta span {
    margin-right: 16px;
}

.tool-detail-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}
@media (max-width: 768px) {
    .tool-detail-body {
        grid-template-columns: 1fr;
    }
}
.tool-screenshot-area {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.tool-screenshot-area img {
    width: 100%;
    border-radius: var(--aoyii-radius-lg);
    border: 1px solid var(--aoyii-border);
}
.tool-visit-btn {
    margin: 0;
}
.tool-excerpt {
    font-size: 15px;
    color: var(--aoyii-text-secondary);
    margin-bottom: 16px;
    padding: 12px 16px;
    background: var(--aoyii-surface-alt);
    border-radius: var(--aoyii-radius-md);
    border-left: 3px solid var(--aoyii-primary);
}
.tool-content {
    font-size: 15px;
    line-height: 1.8;
    color: var(--aoyii-text-primary);
}
.tool-tags {
    margin-top: 20px;
    font-size: var(--aoyii-fs-body-sm);
}
.tool-tag {
    display: inline-block;
    margin: 0 4px;
    color: var(--aoyii-primary);
    text-decoration: none;
}
.tool-tag:hover {
    color: var(--aoyii-primary-dark);
}

/* ---- Screenshot Placeholder ---- */
.tool-screenshot-placeholder {
    width: 100%;
    aspect-ratio: 16 / 10;
    background: var(--aoyii-surface-alt);
    border: 1px dashed var(--aoyii-border);
    border-radius: var(--aoyii-radius-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--aoyii-text-tertiary);
    font-size: var(--aoyii-fs-caption);
    gap: 6px;
}
.tool-screenshot-placeholder span {
    font-size: 32px;
    opacity: 0.4;
}
.tool-screenshot-placeholder p {
    margin: 0;
}

/* ---- Social Share ---- */
.tool-share {
    margin: 0;
    padding-top: 0;
    border-top: none;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.tool-share strong {
    font-size: var(--aoyii-fs-body-sm);
    color: var(--aoyii-text-secondary);
}
.tool-share-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--aoyii-radius-sm);
    border: 1px solid var(--aoyii-border);
    background: var(--aoyii-surface);
    color: var(--aoyii-text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none !important;
}
.share-btn:hover {
    border-color: var(--aoyii-primary);
    color: var(--aoyii-primary);
    box-shadow: var(--aoyii-shadow-1);
    transform: translateY(-1px);
}
.share-twitter:hover { color: #1da1f2; border-color: #1da1f2; }
.share-facebook:hover { color: #1877f2; border-color: #1877f2; }
.share-weibo:hover { color: #e6162d; border-color: #e6162d; }
.share-wechat:hover { color: #07c160; border-color: #07c160; }
/* no <button> underline for WeChat button */
button.share-btn {
    font-family: inherit;
    font-size: inherit;
    padding: 0;
}

/* ---- Related Tools (图文模式) ---- */
.tool-related {
    margin: 40px 0;
}
.tool-related h2 {
    font-size: 20px;
    margin-bottom: 16px;
}
.tool-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}
.tool-related-card {
    background: var(--aoyii-surface);
    border: 1px solid var(--aoyii-border);
    border-radius: var(--aoyii-radius-md);
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.tool-related-card:hover {
    border-color: var(--aoyii-primary);
    box-shadow: var(--aoyii-shadow-2);
    transform: translateY(-2px);
}
.tool-related-card a {
    text-decoration: none !important;
    display: block;
}
.tool-related-card-img {
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--aoyii-surface-alt);
}
.tool-related-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.tool-related-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.tool-related-card-icon img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}
.tool-related-card-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    opacity: 0.3;
}
.tool-related-card-body {
    padding: 12px 14px 14px;
}
.tool-related-card-body h3 {
    font-size: var(--aoyii-fs-body-sm);
    font-weight: 600;
    margin: 0 0 4px;
    color: var(--aoyii-text-primary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.tool-related-card-body p {
    font-size: var(--aoyii-fs-caption);
    color: var(--aoyii-text-secondary);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

/* ---- No results ---- */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--aoyii-text-secondary);
}

/* ---- Pagination（分类/标签归档页分页） ---- */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 24px;
    margin-bottom: 16px;
}
.pagination .nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}
.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    font-size: var(--aoyii-fs-body-sm);
    color: var(--aoyii-text-primary);
    background: var(--aoyii-surface);
    border: 1px solid var(--aoyii-border);
    border-radius: var(--aoyii-radius-md);
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.pagination .page-numbers:hover {
    background: var(--aoyii-surface-hover);
    border-color: var(--aoyii-primary);
    color: var(--aoyii-primary);
}
.pagination .page-numbers.current {
    background: var(--aoyii-primary);
    border-color: var(--aoyii-primary);
    color: #fff;
    font-weight: 600;
    cursor: default;
}
.pagination .page-numbers.dots {
    border-color: transparent;
    background: transparent;
    color: var(--aoyii-text-tertiary);
}

/* ---- 频道搜索框（分类/标签归档页 page-head 下，参照 chat-ai.html） ---- */
.channel-search {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 560px;
    margin-top: 16px;
}
.channel-search input[type="search"] {
    flex: 1;
    height: 44px;
    padding: 0 14px;
    font-size: var(--aoyii-fs-body-sm);
    color: var(--aoyii-text-primary);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.15s;
}
.channel-search input[type="search"]:focus {
    outline: none;
    border-color: var(--accent);
}
.channel-search button {
    width: 44px;
    height: 44px;
    padding: 0;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: var(--accent);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.15s;
}
.channel-search button:hover {
    background: var(--aoyii-primary-dark);
}

/* 2026-09-21 /skill 归档页搜索框：Astra 容器内对齐 page-head，样式复用 .channel-search。 */
.post-type-archive-skill .skill-channel-search {
    max-width: 560px;
    width: 100%;
    margin: 16px 0 28px;
    box-sizing: border-box;
}

/* ===== 全部分类目录页（page-all-categories.php，参照 all-categories.html） ===== */
/* 2026-09-05 修复搜索栏错位：channel-search 在 main.content-layout 之外（.site-content 直下），
   拿不到容器定宽 → 560px 字段贴死视口左缘（x=0）。按设计稿 .cat-filter 规则挂回容器轨道：
   与 content-layout 同步 max-width 1200 + 24px 内边距，输入框左缘对齐 page-head/网格（x=64）。 */
.site-content > .channel-search {
    max-width: var(--container);
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
    box-sizing: border-box;
}
.cat-section {
    margin-bottom: 32px;
}
.cat-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}
.cat-section-head h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--aoyii-fs-h2, 20px);
    font-weight: 600;
    color: var(--aoyii-text-primary);
}
.cat-section-count {
    font-size: var(--aoyii-fs-caption, 12px);
    color: var(--aoyii-text-secondary);
}
.cat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}
.cat-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.cat-card:hover {
    border-color: #c0c5cf;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.cat-card:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}
.cat-card-top {
    display: flex;
    align-items: center;
    gap: 10px;
}
.cat-card-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    color: var(--aoyii-primary);
    background: var(--aoyii-surface-alt, var(--surface));
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.cat-card-name {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--aoyii-text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cat-card-count {
    flex-shrink: 0;
    font-size: 12px;
    color: var(--aoyii-text-secondary);
}
.cat-card-desc {
    font-size: 13px;
    line-height: 1.5;
    color: var(--aoyii-text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
@media (max-width: 1024px) {
    .cat-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 768px) {
    .cat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 480px) {
    .cat-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== 分类归档（category.php，参照 ai-news.html） ===== */
/* 2026-09-05: 桌面端改 3 列（Tim）；≤1024 降 2 列、≤768 单列 */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.news-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.news-card:hover {
    border-color: #c0c5cf;
    box-shadow: 0 4px 16px rgba(17, 17, 17, 0.06);
}
.news-card:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}
.news-thumb {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--aoyii-surface-alt, var(--surface));
}
.news-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.25s ease;
}
.news-card:hover .news-thumb img {
    transform: scale(1.03);
}
.news-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 16px 16px;
}
.news-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--aoyii-text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-card:hover .news-title {
    color: var(--accent);
}
.news-excerpt {
    font-size: 13px;
    line-height: 1.5;
    color: var(--aoyii-text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-more {
    font-size: 13px;
    font-weight: 500;
    color: var(--aoyii-text-primary);
    transition: color 0.15s, transform 0.15s;
}
.news-card:hover .news-more {
    color: var(--accent);
}
.empty-state {
    padding: 48px 0;
    text-align: center;
    color: var(--aoyii-text-secondary);
}
@media (max-width: 768px) {
    .news-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* ===== 文章详情（single.php，参照 news-detail.html） ===== */
.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 32px;
    padding: 32px 24px 48px;
    max-width: var(--container, 1200px);
    margin: 0 auto;
}
.detail-main {
    min-width: 0;
}
.article-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--aoyii-text-secondary);
}
.article-cat {
    padding: 2px 10px;
    border: 1px solid var(--border);
    border-radius: 99px;
    color: var(--accent);
    font-size: 12px;
}
.article-thumb {
    margin: 0 0 20px;
    border-radius: var(--radius);
    overflow: hidden;
}
.article-thumb img {
    width: 100%;
    height: auto;
    display: block;
}
.article-content {
    font-size: 15px;
    line-height: 1.8;
    color: var(--aoyii-text-primary);
}
.article-content h1,
.article-content h2,
.article-content h3 {
    font-weight: 600;
    line-height: 1.4;
    margin: 24px 0 12px;
    color: var(--aoyii-text-primary);
}
.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
}
.article-content a {
    color: var(--accent);
    text-decoration: underline;
}
.detail-side {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.side-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
}
.side-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--aoyii-text-primary);
}
.side-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.side-list a {
    display: block;
    font-size: 13px;
    line-height: 1.5;
    color: var(--aoyii-text-secondary);
    text-decoration: none;
}
.side-list a:hover {
    color: var(--accent);
}

/* ===== 搜索结果（search.php，参照 search-results.html） ===== */
.result-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: var(--container, 1200px);
    margin: 0 auto;
    padding: 24px 24px 48px;
}
.result-card {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.result-card:hover {
    border-color: #c0c5cf;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.result-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 600;
    color: var(--aoyii-primary);
    background: var(--aoyii-surface-alt, var(--surface));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.result-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.result-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.result-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--aoyii-text-primary);
}
.result-desc {
    font-size: 13px;
    line-height: 1.5;
    color: var(--aoyii-text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.result-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--aoyii-text-tertiary);
}
.result-type {
    padding: 1px 8px;
    border: 1px solid var(--border);
    border-radius: 99px;
    color: var(--accent);
}

/* ===== 通用页面正文（page.php） ===== */
.page-prose {
    max-width: var(--container, 800px);
    margin: 0 auto;
    padding: 32px 24px 48px;
    font-size: 15px;
    line-height: 1.8;
    color: var(--aoyii-text-primary);
}
/* content-layout 已有 24px 横向内边距，避免与 page-head(1152) 错位 */
.content-layout > .page-prose {
    max-width: none;
    width: 100%;
    margin: 0;
    padding-left: 0;
    padding-right: 0;
    padding-top: 8px;
}
.page-prose h1,
.page-prose h2,
.page-prose h3 {
    font-weight: 600;
    line-height: 1.4;
    margin: 24px 0 12px;
}
.page-prose img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
}
.page-prose a {
    color: var(--accent);
}
@media (max-width: 768px) {
    .detail-layout {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 24px 16px 40px;
    }
}

/* ===== 全站容器宽度统一（除首页外各页与首页 --container 对齐） ===== */
.content-layout {
    max-width: var(--container);
    margin: 0 auto;
    padding: 24px 24px 48px;
    width: 100%;
}
.taxonomy-wrap {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}
/* astra 容器（/tool /skill 归档、工具详情 .ast-container）统一为站点容器 */
.ast-container {
    max-width: var(--container);
}

/* =============================================

/* ============================================================
     工具详情页改版（对齐 .design-handoff-2026-09-02/tool-detail.html）
     2026-09-05: tool-head 渐变带头 + 浏览器相框截图 + detail-layout 主/侧栏 + related-section
     ============================================================ */
.tool-head {
    max-width: var(--container);
    width: calc(100% - 48px);
    margin: 24px auto 0;
    padding: 28px 32px;
    background: linear-gradient(135deg, rgba(22,119,255,0.08) 0%, rgba(124,92,245,0.08) 100%);
    border: 1px solid var(--border);
    border-radius: 12px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
}
.tool-head-icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 700;
    color: var(--accent);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(17,17,17,0.06);
}
.tool-head-main { min-width: 0; flex: 1; }
.tool-tagline {
    margin-top: 4px;
    font-size: 15px;
    color: var(--muted);
    text-wrap: balance;
}
.tool-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
}
.tool-tag {
    display: inline-flex;
    align-items: center;
    height: 26px;
    padding: 0 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    background: rgba(22,119,255,0.08);
    border-radius: 13px;
    transition: background 0.15s;
}
.tool-tag--alt { color: var(--accent-secondary); background: rgba(124,92,245,0.08); }
.tool-head-actions {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.visit-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 42px;
    padding: 0 20px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: var(--accent);
    border-radius: var(--radius);
    transition: background 0.15s;
    white-space: nowrap;
}
.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    color: var(--muted);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: color 0.15s, border-color 0.15s;
}
.shot-section {
    max-width: var(--container);
    margin: 28px auto 0;
    padding: 0 24px;
}
.browser-frame {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(17,17,17,0.07);
}
.browser-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 14px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}
.browser-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border);
}
.browser-url {
    margin-left: 10px;
    flex: 1;
    max-width: 420px;
    height: 22px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    font-size: 11px;
    color: var(--muted);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 11px;
    overflow: hidden;
    white-space: nowrap;
}
.detail-layout {
    max-width: calc(var(--container) - 48px);
    margin: 40px auto 0;
    padding: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 40px;
    align-items: start;
}
.detail-main { min-width: 0; }
.detail-section { margin-bottom: 36px; }
.detail-lead {
    font-size: 16px;
    line-height: 1.7;
    color: var(--fg);
    text-wrap: pretty;
}
.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}
.feature-card {
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.feature-icon {
    width: 36px;
    height: 36px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    background: rgba(22,119,255,0.08);
    border-radius: var(--radius);
}
.hl-list { display: grid; gap: 10px; }
.hl-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    line-height: 1.6;
}
.hl-check {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 2px;
    color: var(--accent);
}
.who-card {
    padding: 18px 20px;
    background: linear-gradient(135deg, rgba(22,119,255,0.05) 0%, rgba(124,92,245,0.05) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    line-height: 1.7;
    color: var(--fg);
    text-wrap: pretty;
}
.detail-side {
    position: sticky;
    top: 80px;
    display: grid;
    gap: 16px;
}
.side-card {
    padding: 20px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(17,17,17,0.04);
}
.side-domain {
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 13px;
    color: var(--muted);
}
.side-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.side-share { display: flex; gap: 8px; }
.related-section {
    max-width: var(--container);
    margin: 8px auto 0;
    padding: 0 24px 8px;
}
.related-section { padding-left: 16px; padding-right: 16px; }
.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

@media (max-width: 1024px) {
        .detail-layout {
                grid-template-columns: 1fr;
                gap: 32px;
        }
        .detail-side {
                position: static;
                grid-template-columns: repeat(3, 1fr);
                align-items: stretch;
        }
}

@media (max-width: 768px) {
        .tool-head { flex-direction: column; }
        .tool-head-actions { width: 100%; }
        .visit-btn { flex: 1; justify-content: center; }
        .related-grid { grid-template-columns: repeat(2, 1fr); }
        .detail-side { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
        .related-grid { grid-template-columns: 1fr; }
        .feature-grid { grid-template-columns: 1fr; }
        .tool-head { margin-top: 16px; padding: 20px; width: calc(100% - 32px); }
        .shot-section, .detail-layout, .related-section { padding-left: 16px; padding-right: 16px; }
        .tool-head-main h1 { font-size: 24px; }
}

.related-card {
    min-width: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.related-card:hover {
    border-color: #c0c5cf;
    box-shadow: 0 4px 16px rgba(17, 17, 17, 0.06);
}
.related-card-img {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--aoyii-surface-alt, var(--surface));
}
.related-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.related-card:hover .related-card-img img {
    transform: scale(1.03);
}
.related-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}
.related-card-icon img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}
.related-card-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}
.related-card-body {
    padding: 14px 16px 16px;
}
.related-card-body h3 {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.related-card-body p {
    font-size: 13px;
    color: var(--aoyii-text-secondary);
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.related-section h2 {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.3px;
    margin-bottom: 14px;
}
.side-visit .visit-btn {
    width: 100%;
    justify-content: center;
}
.side-domain {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    font-size: 13px;
    color: var(--aoyii-text-secondary);
    word-break: break-all;
}
.side-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.side-share {
    display: flex;
    gap: 10px;
}
.side-share .share-btn {
    width: 38px;
    height: 38px;
}
.side-card h3 {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 12px;
}
/* ===== 巡检宽度修复（2026-09-05 复检） ===== */
/* /tool/ /skill/ Astra 默认归档: ast-row 负 margin -16px 在无内边距的 site-main 上溢出视口 */
.post-type-archive-tool .site-main,
.post-type-archive-skill .site-main {
    max-width: calc(1280px - 32px);
    margin: 0 auto;
    padding: 0 32px;
    box-sizing: border-box;
}
/* 工具详情页: 我们的模板自带完整纵向结构, 禁用 Astra 的 ast-container flex 行为 */
.single-tool .site-content .ast-container {
    display: block;
    max-width: calc(var(--container) - 8px); /* 内容带宽 1152, 与全站统一 */
}
/* 恢复 detail-layout 原始设计（覆盖上一条 flex 修补） */
.single-tool .site-content .ast-container .detail-layout {
    max-width: calc(var(--container, 1200px) - 48px);
    margin: 40px auto 0;
    padding: 0 24px;
}
.single-tool .site-content .ast-container .detail-main {
    padding: 0;
}
.single-tool .site-content .ast-container .tool-head,
.single-tool .site-content .ast-container .shot-section,
.single-tool .site-content .ast-container .related-section {
    max-width: var(--container, 1200px);
    margin-left: auto;
    margin-right: auto;
}
.single-tool .site-content .ast-container .tool-head {
    width: 100%;
    margin-top: 24px;
}
.single-tool .site-content .ast-container .shot-section,
.single-tool .site-content .ast-container .related-section,
.single-tool .site-content .ast-container .detail-layout {
    padding-left: 0;
    padding-right: 0;
}
/* 2026-09-14: crumbs 1152 band, aligns tool-head/detail-layout */
.single-tool .site-content .ast-container .crumbs {
    max-width: calc(var(--container) - 48px);
    width: 100%;
    margin: 16px auto 0;
    padding: 0;
    box-sizing: border-box;
}
/* ===== Astra CPT 归档页头重铸（2026-09-05）：/tool/ /skill/ 白底 ast-archive-description → 全站 page-head 渐变带 ===== */
/* 根因: ① Astra 动态 CSS（posts-structures/archive-dynamic.css.php）输出 body.archive .ast-archive-description
   { max-width:1200px; width:100%; padding:3em }，specificity 0-2-1 且排在子主题之后 → 子主题同权重规则必输，
   须用 body.post-type-archive-*.archive（0-3-1，body 同时带 archive 类）压过；
   ② 卡片列 x=32（site-main pad 32 + ast-row 负 margin -16 + article pad 16 叠加）vs 渐变带 x=64 →
   site-main 内容带改 48px 边距（=1152+48×2），负 margin/内边距几何不变，卡片精确落 64..1216 */
.post-type-archive-tool .site-main,
.post-type-archive-skill .site-main {
    max-width: calc(var(--container) + 48px); /* 1248 = 1152 内容带 + 2×48 边距 */
    margin: 0 auto;
    padding: 0 48px;
    box-sizing: border-box;
}
body.post-type-archive-tool.archive .ast-archive-description,
body.post-type-archive-skill.archive .ast-archive-description {
    max-width: calc(var(--container) - 48px); /* 1152 视觉带，与 .page-head 同 */
    width: calc(100% - 48px);
    margin: 24px auto 32px;
    padding: 28px 32px 26px;
    background: linear-gradient(135deg, rgba(22, 119, 255, 0.08) 0%, rgba(124, 92, 245, 0.08) 100%);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-sizing: border-box;
}
/* Astra 动态标题（2.85rem/300/自定义器色，0-3-1）→ 全站 page-head 标题规格（0-4-1 压过） */
body.post-type-archive-tool.archive .ast-archive-description .ast-archive-title,
body.post-type-archive-skill.archive .ast-archive-description .ast-archive-title {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.25;
    color: var(--fg);
    margin-bottom: 0;
}
/* ≤921 Astra 网格塌单列(em 缩放)：page-head/卡片统一 24px 页边距，卡片纵向堆叠 */
@media (max-width: 921px) {
    .post-type-archive-tool .site-main,
    .post-type-archive-skill .site-main {
        max-width: var(--container);
        padding: 0 24px;
    }
    body.post-type-archive-tool.archive .ast-archive-description,
    body.post-type-archive-skill.archive .ast-archive-description {
        width: calc(100% - 48px); /* desc 是 site-main 兄弟节点，靠自身 margin 定位 → 保持自收缩 */
        max-width: none;
        margin: 16px auto 24px;
        padding: 20px;
    }
    body.post-type-archive-tool.archive .ast-archive-description .ast-archive-title,
    body.post-type-archive-skill.archive .ast-archive-description .ast-archive-title {
        font-size: 26px; /* 与 .page-head h1 移动端同节奏 */
    }
    .post-type-archive-tool .site-main .ast-row,
    .post-type-archive-skill .site-main .ast-row {
        display: block;
        margin-left: 0;
        margin-right: 0;
    }
    /* 0-4-1 压过 Astra em 内边距（.ast-separate-container .ast-article-post 等），卡片内盒精确落 24px 页边距 */
    body.post-type-archive-tool.archive .site-main article,
    body.post-type-archive-skill.archive .site-main article {
        width: 100%;
        max-width: none;
        padding-left: 0;
        padding-right: 0;
        margin-bottom: 16px;
    }
    body.post-type-archive-tool.archive .site-main article:last-child,
    body.post-type-archive-skill.archive .site-main article:last-child {
        margin-bottom: 0;
    }
}

/* ===== 404（子主题 404.php，2026-09-14 双语化） ===== */
.error-404 {
    max-width: var(--container, 1200px);
    margin: 0 auto;
    padding: 96px 24px 120px;
    text-align: center;
}
.error-404 h1 {
    font-size: 40px;
    font-weight: 700;
    color: var(--brand-fg, #111111);
    margin: 0 0 16px;
}
.error-404 .err-sub {
    color: var(--brand-muted, #6b7280);
    margin: 0 0 32px;
}
.error-404 .err-search {
    max-width: 420px;
    margin: 0 auto 40px;
}
.error-404 .err-home {
    color: var(--brand-accent, #1677ff);
    text-decoration: none;
}
.error-404 .err-home:hover {
    color: var(--brand-color-primary-hover, #4096ff);
}

.error-404 .err-search .search-form {
    display: flex;
    align-items: stretch;
    gap: 8px;
}
.error-404 .err-search .search-field {
    flex: 1;
    height: 44px;
    padding: 0 14px;
    border: 1px solid var(--brand-border, #d9dee7);
    border-radius: var(--aoyii-radius-md, 8px);
    font-size: 14px;
    color: var(--brand-fg, #111111);
    background: var(--brand-bg, #fff);
}
.error-404 .err-search .search-field:focus {
    outline: none;
    border-color: var(--brand-accent, #1677ff);
}
.error-404 .err-search .search-submit {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--brand-accent, #1677ff);
    border-radius: var(--aoyii-radius-md, 8px);
    background: var(--brand-accent, #1677ff);
    color: #fff;
    cursor: pointer;
}


/* ---- Submit form: pricing / tags / category tree ---- */
/* 标签搜索选择器（仅选现有标签，禁止自创；2026-09-26） */
.aoyii-tag-picker {
    position: relative;
}
.aoyii-tag-picker-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 0;
}
.aoyii-tag-picker-chips:not(:empty) {
    margin-bottom: 8px;
}
.aoyii-tag-picker-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px 4px 12px;
    font-size: 13px;
    color: var(--brand-color-primary-text);
    background: var(--brand-color-primary-bg);
    border: 1px solid var(--brand-color-primary-border);
    border-radius: 999px;
}
.aoyii-tag-picker-chip-remove {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--brand-muted);
    cursor: pointer;
    padding: 0 2px;
    font-size: 14px;
    line-height: 1;
}
.aoyii-tag-picker-chip-remove:hover {
    color: var(--brand-color-error);
}
.aoyii-tag-picker-control input {
    width: 100%;
}
.aoyii-tag-picker-control input:disabled {
    background: var(--brand-color-fill-tertiary);
    cursor: not-allowed;
}
.aoyii-tag-picker-dropdown {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% - 24px);
    z-index: 20;
    max-height: 260px;
    overflow-y: auto;
    background: var(--brand-bg);
    border: 1px solid var(--brand-border);
    border-radius: var(--brand-border-radius);
    box-shadow: var(--aoyii-shadow-1);
}
.aoyii-tag-picker-option {
    display: block;
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    padding: 9px 14px;
    font-size: 14px;
    color: var(--brand-fg);
    cursor: pointer;
}
.aoyii-tag-picker-option:hover,
.aoyii-tag-picker-option.is-active {
    background: var(--brand-color-primary-bg);
    color: var(--brand-color-primary-text);
}
.aoyii-tag-picker-option:focus-visible {
    outline: 2px solid var(--brand-accent);
    outline-offset: -2px;
}
.aoyii-tag-picker-empty {
    padding: 10px 14px;
    font-size: 13px;
    color: var(--brand-muted);
}
.aoyii-tag-picker-hint {
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--brand-muted);
}
/* 表单字段统一纵向节奏（此前无定义，Submit 按钮贴死上方输入框，2026-09-26） */
.tool-submit-form .form-field {
    margin-bottom: var(--brand-size-md);
}
.tool-submit-form .form-field:last-child {
    margin-bottom: 0;
}
.tool-submit-form .form-field .ast-button {
    margin-top: var(--brand-size-xs);
}
.tool-submit-page > h2 {
    margin-top: 0;
}
.tool-submit-page .submit-subtitle {
    margin: 0 0 20px;
    color: var(--muted);
    font-size: 15px;
}
.tool-submit-form .pricing-options {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}
.tool-submit-form .pricing-option {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--aoyii-fs-body-sm);
    color: var(--aoyii-text-secondary);
    cursor: pointer;
}
.tool-submit-form .pricing-option input[type="radio"] {
    accent-color: var(--aoyii-primary);
}

/* 层级分类勾选：芯片式多选（分组卡片 + 全选 + 计数反馈） */
.tool-submit-cat-hint {
    margin: 4px 0 10px;
    font-size: var(--brand-font-size-sm);
    color: var(--muted);
}
.tool-submit-cat-tree {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.tool-submit-cat-group {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg, #fff);
}
.tool-submit-cat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 12px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}
.tool-submit-cat-all {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    cursor: pointer;
}
.tool-submit-cat-all input,
.tool-submit-cat-item input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}
.tool-submit-cat-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--fg);
}
.tool-submit-cat-all-chip {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 3px 12px;
    font-size: 12px;
    font-weight: 500;
    color: var(--muted);
    background: var(--bg, #fff);
    border: 1px solid var(--border);
    border-radius: 999px;
    white-space: nowrap;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.tool-submit-cat-all:hover .tool-submit-cat-all-chip {
    color: var(--accent);
    border-color: var(--brand-color-primary-border);
}
.tool-submit-cat-all input:checked ~ .tool-submit-cat-all-chip,
.tool-submit-cat-all.is-full .tool-submit-cat-all-chip {
    color: var(--brand-color-primary-text);
    background: var(--brand-color-primary-bg);
    border-color: var(--brand-color-primary-border);
}
.tool-submit-cat-all input:checked ~ .tool-submit-cat-all-chip::before {
    content: "✓";
    margin-right: 4px;
    font-size: 11px;
}
.tool-submit-cat-all.is-partial .tool-submit-cat-all-chip {
    color: var(--accent);
    background: var(--bg, #fff);
    border-style: dashed;
    border-color: var(--brand-color-primary-border);
}
.tool-submit-cat-all input:focus-visible ~ .tool-submit-cat-all-chip {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.tool-submit-cat-count {
    font-size: 12px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}
.tool-submit-cat-count.has-selected {
    color: var(--accent);
    font-weight: 600;
}
.tool-submit-cat-children {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px;
}
.tool-submit-cat-item {
    position: relative;
    display: inline-flex;
    margin: 0;
    cursor: pointer;
}
.tool-submit-cat-chip {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 6px 14px;
    font-size: 13px;
    color: var(--fg);
    background: var(--bg, #fff);
    border: 1px solid var(--border);
    border-radius: 999px;
    white-space: nowrap;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.tool-submit-cat-item:hover .tool-submit-cat-chip {
    border-color: var(--brand-color-primary-border);
    background: var(--surface);
}
.tool-submit-cat-item:active .tool-submit-cat-chip {
    border-color: var(--brand-color-primary-border-hover);
}
.tool-submit-cat-item input:checked ~ .tool-submit-cat-chip {
    color: var(--brand-color-primary-text);
    background: var(--brand-color-primary-bg);
    border-color: var(--brand-color-primary-border);
}
.tool-submit-cat-item input:checked ~ .tool-submit-cat-chip::before {
    content: "✓";
    margin-right: 6px;
    font-size: 12px;
    font-weight: 700;
}
.tool-submit-cat-item input:focus-visible ~ .tool-submit-cat-chip {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
@media (max-width: 480px) {
    .tool-submit-cat-children {
        gap: 8px;
        padding: 12px;
    }
    .tool-submit-cat-chip {
        min-height: 38px;
        padding: 6px 13px;
    }
    .tool-submit-cat-head {
        flex-wrap: wrap;
    }
}
@media (prefers-reduced-motion: reduce) {
    .tool-submit-cat-chip,
    .tool-submit-cat-all-chip {
        transition: none;
    }
}

/* ===== 移动端可访问性（2026-09-15）：触控目标 ≥32px、正文字号 ≥12px ===== */
@media (max-width: 768px) {
  .hero-hot-word {
    display: inline-block;
    padding: 5px 10px;
    margin: 2px 0;
  }
  .hero-hot-word::after { inset: 0; }
  .section-more {
    display: inline-block;
    padding: 6px 0;
    font-size: 13px;
  }
  .cat-card-icon { min-width: 32px; }
  /* Astra 卡片 meta（entry-meta/posted-on）移动端字号 ≥12px */
  .entry-meta, .posted-on, .published, .entry-meta a {
    font-size: 12px !important;
  }
  .cat-section-count { font-size: 12px !important; }
  /* 卡片标题链接撑满触控区：astra 卡片 entry-title a 行高扩展 */
  .entry-title a { display: inline-block; padding: 4px 0; }
  /* 页脚链接与备案号触控区扩展 */
  .footer-links a, .beian-item {
    display: inline-block;
    padding: 4px 0;
  }
  /* 分页箭头链接触控区 */
  .pagination .page-numbers { min-height: 36px; }
  /* cookie banner 内链接触控区 */
  .aoyii-cookie-banner__message a { display: inline-block; padding: 4px 0; }
}

/* ===== TOP 榜单（taxonomy-tool_category-top.php） ===== */
.rank-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  counter-reset: rank;
}
.rank-item { counter-increment: rank; }
.rank-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.rank-row:hover {
  background: var(--bg);
  border-color: #c0c5cf;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.rank-num {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--border);
}
.rank-item--gold .rank-num {
  color: #8a6100;
  background: linear-gradient(135deg, #ffe08a, #f5c542);
  border-color: #e8b93a;
}
.rank-item--silver .rank-num {
  color: #5a6472;
  background: linear-gradient(135deg, #eef1f5, #cfd6df);
  border-color: #b9c2cd;
}
.rank-item--bronze .rank-num {
  color: #7c4a1e;
  background: linear-gradient(135deg, #f0c9a8, #d99a5f);
  border-color: #c88a4e;
}
.rank-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.rank-score {
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  background: rgba(59, 91, 219, 0.08);
  border-radius: 999px;
  padding: 3px 10px;
}
@media (max-width: 480px) {
  .rank-row { padding: 10px 12px; gap: 10px; }
  .rank-score { font-size: 13px; padding: 2px 8px; }
}

/* 分类页榜单入口链接 */
.cat-rank-entry { margin: -6px 0 10px; font-size: 14px; }
.cat-rank-entry a { color: var(--accent); text-decoration: none; font-weight: 600; }
.cat-rank-entry a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ===== 榜单首页（/tool-category/top/ 索引） ===== */
.rank-index-group { margin-bottom: 28px; }
.rank-index-label {
  font-size: 18px;
  font-weight: 800;
  margin: 0 0 12px;
  padding-left: 10px;
  border-left: 4px solid var(--accent);
  line-height: 1.3;
}
.rank-index-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.rank-index-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.rank-index-card:hover {
  background: var(--bg);
  border-color: #c0c5cf;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.rank-index-name { font-weight: 700; font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-index-meta {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  background: rgba(59, 91, 219, 0.08);
  border-radius: 999px;
  padding: 2px 8px;
}
@media (max-width: 1024px) { .rank-index-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px) { .rank-index-grid { grid-template-columns: repeat(2, 1fr); } }

/* ===== 分类页双栏布局：左工具卡片网格（3列+分页） + 右 TOP50 纵向榜单 ===== */
.cat-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 20px;
  align-items: start;
}
.cat-main { min-width: 0; }
.cat-main .tool-grid { grid-template-columns: repeat(3, 1fr); }
.cat-main .tool-grid .tool-card { min-height: 92px; }
.cat-rank-side {
  position: sticky;
  top: 90px;
}
.cat-rank-side-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
}
.cat-rank-side-title {
  margin: 0;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 800;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.rank-list--mini {
  gap: 0;
  padding: 8px;
}
.rank-list--mini .rank-row {
  padding: 7px 9px;
  gap: 9px;
  border-radius: 8px;
}
.rank-list--mini .rank-row:hover {
  background: var(--bg);
}
.rank-list--mini .rank-num {
  width: 26px;
  height: 26px;
  font-size: 13px;
}
.rank-list--mini .rank-icon {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  background: var(--bg);
}
.rank-list--mini .rank-icon img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}
.rank-list--mini .tool-name {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cat-rank-more {
  display: block;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  text-align: center;
  border-top: 1px solid var(--border);
}
.cat-rank-more:hover { background: var(--bg); }
@media (max-width: 1024px) {
  .cat-layout { grid-template-columns: minmax(0, 1fr) 260px; }
}
@media (max-width: 768px) {
  .cat-layout { grid-template-columns: 1fr; }
  .cat-rank-side { position: static; order: -1; }
  .cat-rank-side-card { padding: 12px; }
}

/* Skill detail — install block */
.skill-install {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--brand-border, var(--border));
}
.skill-install h2 {
  font-size: var(--brand-font-size-heading-5, 18px);
  margin: 0 0 12px;
}
.skill-install-cmd {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}
.skill-install-cmd code {
  font-family: var(--brand-font-family-code, ui-monospace, monospace);
  font-size: 13px;
  padding: 8px 12px;
  background: var(--brand-surface, var(--bg));
  border: 1px solid var(--brand-border, var(--border));
  border-radius: 8px;
  word-break: break-all;
}
