@import "fonts/xu-icons.css";

/* ==========================================================================
   XU 官方站点样式表 (XU Official Web Design System)
   Strictly Aligned with XU Brand Identity (VI) & UI Design System v2.6.0
   ========================================================================== */

:root {
  /* 品牌主色阶 (Cinnabar Red Spectrum) */
  --xu-brand-500: #FF385C;
  --xu-brand-600: #E11D48;
  --xu-brand-700: #BE123C;
  --xu-brand-glow: #FF385C;
  --xu-brand-grad: linear-gradient(135deg, #FF385C 0%, #E11D48 50%, #BE123C 80%, #F59E0B 100%);
  --xu-brand-grad-subtle: linear-gradient(135deg, rgba(255, 56, 92, 0.15) 0%, rgba(225, 29, 72, 0.05) 100%);

  /* 辅助与状态色 (Accents & Semantics) */
  --xu-accent-amber: #F59E0B;
  --xu-accent-gold: #FBBF24;
  --xu-success: #10B981;
  --xu-success-bg: rgba(16, 185, 129, 0.12);
  --xu-warning: #F59E0B;
  --xu-warning-bg: rgba(245, 158, 11, 0.12);
  --xu-danger: #EF4444;
  --xu-danger-bg: rgba(239, 68, 68, 0.12);
  --xu-info: #06B6D4;
  --xu-info-bg: rgba(6, 182, 212, 0.12);
  --xu-purple: #A855F7;
  --xu-purple-bg: rgba(168, 85, 247, 0.12);

  /* 曜石黑背景色阶 (Obsidian Void Dark) */
  --xu-bg-void: #050508;
  --xu-bg-canvas: #0A090D;
  --xu-bg-surface: #121118;
  --xu-bg-elevated: #1A1824;
  --xu-bg-glass: rgba(18, 17, 24, 0.85);

  /* 文本色阶 (Dark Mode Text) */
  --xu-text-primary: #F8FAFC;
  --xu-text-secondary: #94A3B8;
  --xu-text-muted: #64748B;
  --xu-text-on-brand: #FFFFFF;

  /* 边框色阶 (Borders) */
  --xu-border-subtle: rgba(255, 255, 255, 0.08);
  --xu-border-medium: rgba(255, 255, 255, 0.16);
  --xu-border-highlight: rgba(225, 29, 72, 0.35);

  /* 阴影色阶 (Shadows) */
  --xu-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --xu-shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
  --xu-shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.7);
  --xu-shadow-glow: 0 0 24px rgba(225, 29, 72, 0.35);
  --xu-shadow-glow-amber: 0 0 20px rgba(245, 158, 11, 0.25);

  /* 代码与语法高亮色阶 (Dark Syntax - WCAG AAA Compliant) */
  --xu-code-bg: #050508;
  --xu-code-header-bg: #0F0E13;
  --xu-code-text: #E2E8F0;

  --xu-syn-import: #38BDF8;
  --xu-syn-import-hash: #FF385C;
  --xu-syn-kw: #FF385C;
  --xu-syn-flow: #F59E0B;
  --xu-syn-type: #38BDF8;
  --xu-syn-fn: #A855F7;
  --xu-syn-str: #34D399;
  --xu-syn-num: #FBBF24;
  --xu-syn-cmt: #64748B;
  --xu-syn-borrow: #EC4899;
  --xu-syn-trait: #60A5FA;

  /* 字体排印 (Typography) */
  --xu-font-sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --xu-font-mono: "JetBrains Mono", "Fira Code", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* 圆角与过渡 (Radii & Transitions) */
  --xu-radius-sm: 6px;
  --xu-radius-md: 10px;
  --xu-radius-lg: 16px;
  --xu-radius-xl: 24px;
  --xu-radius-full: 9999px;

  --xu-trans-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --xu-trans-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);

  color-scheme: dark;
}

[data-theme="light"] {
  /* 宣纸雪岩明亮体系 (Stone Paper Light) */
  --xu-brand-500: #E11D48;
  --xu-brand-600: #BE123C;
  --xu-brand-700: #881337;
  --xu-brand-glow: #BE123C;
  --xu-brand-grad: linear-gradient(135deg, #E11D48 0%, #BE123C 50%, #881337 100%);
  --xu-brand-grad-subtle: linear-gradient(135deg, rgba(225, 29, 72, 0.08) 0%, rgba(190, 18, 60, 0.02) 100%);

  --xu-bg-void: #F8F9FA;
  --xu-bg-canvas: #F8F9FA;
  --xu-bg-surface: #FFFFFF;
  --xu-bg-elevated: #FFFFFF;
  --xu-bg-glass: rgba(255, 255, 255, 0.88);

  --xu-text-primary: #111827;
  --xu-text-secondary: #4B5563;
  --xu-text-muted: #6B7280;
  --xu-text-on-brand: #FFFFFF;

  --xu-border-subtle: rgba(0, 0, 0, 0.08);
  --xu-border-medium: rgba(0, 0, 0, 0.14);
  --xu-border-highlight: rgba(190, 18, 60, 0.35);

  --xu-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --xu-shadow-md: 0 8px 24px rgba(0, 0, 0, 0.06);
  --xu-shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.08);
  --xu-shadow-glow: 0 0 20px rgba(225, 29, 72, 0.15);

  --xu-success: #047857;
  --xu-success-bg: rgba(4, 120, 87, 0.1);
  --xu-warning: #B45309;
  --xu-warning-bg: rgba(180, 83, 9, 0.1);
  --xu-danger: #DC2626;
  --xu-danger-bg: rgba(220, 38, 38, 0.1);
  --xu-info: #0284C7;
  --xu-info-bg: rgba(2, 132, 199, 0.1);
  --xu-purple: #7E22CE;
  --xu-purple-bg: rgba(126, 34, 206, 0.1);

  --xu-code-bg: #F8FAFC;
  --xu-code-header-bg: #F1F5F9;
  --xu-code-text: #0F172A;

  /* 明亮模式高对比专色 (7:1+ AAA) */
  --xu-syn-import: #0284C7;
  --xu-syn-import-hash: #BE123C;
  --xu-syn-kw: #BE123C;
  --xu-syn-flow: #B45309;
  --xu-syn-type: #0369A1;
  --xu-syn-fn: #7E22CE;
  --xu-syn-str: #047857;
  --xu-syn-num: #92400E;
  --xu-syn-cmt: #78716C;
  --xu-syn-borrow: #9D174D;
  --xu-syn-trait: #1D4ED8;

  color-scheme: light;
}

/* ==========================================================================
   全局重置与基础样式 (Reset & Base)
   ========================================================================== */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { min-height: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--xu-font-sans);
  background-color: var(--xu-bg-void);
  background-image: radial-gradient(circle at 20% 0%, rgba(225, 29, 72, 0.08), transparent 45%);
  background-attachment: fixed;
  color: var(--xu-text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color var(--xu-trans-normal), color var(--xu-trans-normal);
}

[data-theme="light"] body {
  background-image: radial-gradient(circle at 20% 0%, rgba(190, 18, 60, 0.05), transparent 45%);
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--xu-bg-void); }
::-webkit-scrollbar-thumb {
  background: var(--xu-border-medium);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: var(--xu-brand-500); }

a {
  color: var(--xu-brand-glow);
  text-decoration: none;
  transition: color var(--xu-trans-fast);
}
a:hover { text-decoration: underline; }
[data-theme="light"] a { color: var(--xu-brand-600); }

/* ==========================================================================
   导航顶栏 (Header Bar & Navigation)
   ========================================================================== */
.header-bar {
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 10px 24px;
  min-height: 60px;
  background: var(--xu-bg-glass);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--xu-border-subtle);
  transition: background-color var(--xu-trans-normal), border-color var(--xu-trans-normal);
}

.header-inner {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--xu-text-primary);
  text-decoration: none;
  flex: 0 0 auto;
}
.brand-wrapper:hover { text-decoration: none; color: var(--xu-text-primary); }

.brand-logo-img {
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 2px 8px rgba(225, 29, 72, 0.4));
  transition: transform var(--xu-trans-fast);
}
.brand-wrapper:hover .brand-logo-img {
  transform: scale(1.08) rotate(3deg);
}

.brand-title {
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand-title .badge {
  font-size: 11px;
  font-weight: 700;
  font-family: var(--xu-font-mono);
  background: rgba(225, 29, 72, 0.12);
  color: var(--xu-brand-glow);
  padding: 2px 7px;
  border-radius: var(--xu-radius-full);
  border: 1px solid rgba(225, 29, 72, 0.3);
}
[data-theme="light"] .brand-title .badge {
  color: var(--xu-brand-600);
  background: rgba(190, 18, 60, 0.08);
}

.nav-tabs {
  display: flex;
  align-items: center;
  gap: 3px;
  background: rgba(255, 255, 255, 0.04);
  padding: 3px 4px;
  border-radius: var(--xu-radius-full);
  border: 1px solid var(--xu-border-subtle);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: all var(--xu-trans-fast);
}
[data-theme="light"] .nav-tabs {
  background: rgba(0, 0, 0, 0.035);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.nav-tab-btn {
  padding: 6px 14px;
  border-radius: var(--xu-radius-full);
  background: transparent;
  color: var(--xu-text-secondary);
  border: none;
  font-size: 13.5px;
  font-weight: 600;
  font-family: var(--xu-font-sans);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--xu-trans-fast), background var(--xu-trans-fast), transform var(--xu-trans-fast), box-shadow var(--xu-trans-fast);
}
.nav-tab-btn i {
  font-size: 13px;
  opacity: 0.85;
  transition: transform var(--xu-trans-fast);
}
.nav-tab-btn:hover {
  color: var(--xu-text-primary);
  background: rgba(255, 255, 255, 0.08);
  text-decoration: none;
  transform: translateY(-1px);
}
.nav-tab-btn:hover i {
  transform: translateY(-1px);
}
[data-theme="light"] .nav-tab-btn:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--xu-text-primary);
}
.nav-tab-btn.active {
  background: var(--xu-brand-500);
  background-image: var(--xu-brand-grad);
  color: #FFFFFF;
  box-shadow: 0 2px 10px rgba(225, 29, 72, 0.35);
}
.nav-tab-btn.active i {
  opacity: 1;
}
.nav-tab-btn.active:hover {
  color: #FFFFFF;
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.mobile-menu-btn {
  display: none;
}

.mobile-nav-scrim {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--xu-trans-normal);
  z-index: 998;
}
body.mobile-nav-open .mobile-nav-scrim {
  opacity: 1;
  pointer-events: auto;
}

.header-social, .footer-social {
  display: flex;
  align-items: center;
  gap: 4px;
}
.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 44px;
  min-height: 44px;
  border-radius: var(--xu-radius-sm);
  color: var(--xu-text-secondary);
  text-decoration: none;
}
[data-theme="light"] .social-link { color: var(--xu-text-secondary); }
.social-link:hover {
  color: var(--xu-text-primary);
  background: var(--xu-bg-elevated);
  text-decoration: none;
}
.social-link:focus-visible {
  outline: 2px solid var(--xu-brand-500);
  outline-offset: 3px;
}
.social-icon { flex: 0 0 auto; }
.social-handle { color: inherit; }
.footer-social {
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-bottom: 12px;
}
.footer-social .social-link { padding: 0 10px; }

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--xu-radius-md);
  background: var(--xu-bg-surface);
  border: 1px solid var(--xu-border-subtle);
  color: var(--xu-text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--xu-font-sans);
  text-decoration: none;
  transition: all var(--xu-trans-fast);
  box-shadow: var(--xu-shadow-sm);
  padding: 0;
  line-height: 1;
}
.icon-btn:hover {
  color: var(--xu-text-primary);
  border-color: var(--xu-border-medium);
  background: var(--xu-bg-elevated);
  text-decoration: none;
}

.icon-btn[hreflang] {
  width: auto;
  min-width: 36px;
  padding: 0 8px;
  white-space: nowrap;
}

#theme-toggle-btn {
  width: auto;
  min-width: 36px;
  padding: 0 10px;
  font-size: 11px;
  font-family: var(--xu-font-mono);
}

/* ==========================================================================
   页面骨架与侧边栏 (Page Layout & Side Navigation Rail)
   ========================================================================== */
.page {
  display: grid;
  grid-template-columns: 1fr;
  min-height: calc(100vh - 9rem);
  max-width: 1400px;
  margin: 0 auto;
}
.page:has(aside.side) {
  grid-template-columns: 240px minmax(0, 1fr);
}

aside.side {
  background: var(--xu-bg-surface);
  border-right: 1px solid var(--xu-border-subtle);
  padding: 12px 0 48px;
  font-size: 13px;
}
.side-h {
  padding: 10px 14px 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--xu-text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 8px 0 0;
}
.side-h small {
  display: block;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  margin-top: 4px;
  color: var(--xu-text-muted);
}
aside.side ul { list-style: none; margin: 0; padding: 0; }
aside.side li a {
  display: block;
  padding: 6px 14px;
  font-size: 13px;
  font-family: var(--xu-font-mono);
  color: var(--xu-text-secondary);
  border-left: 3px solid transparent;
  transition: all var(--xu-trans-fast);
}
aside.side li a:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--xu-text-primary);
  text-decoration: none;
}
[data-theme="light"] aside.side li a:hover {
  background: rgba(0, 0, 0, 0.04);
}
aside.side li a.on {
  background: rgba(225, 29, 72, 0.12);
  color: var(--xu-brand-500);
  border-left-color: var(--xu-brand-500);
  font-weight: 700;
}

main.doc, main.home {
  padding: 36px 32px 80px;
  min-width: 0;
}
main.doc { max-width: 54rem; }
main.doc.download { max-width: 1100px; }
main.home { max-width: 1100px; margin: 0 auto; }

h1, h2, h3, h4 {
  font-family: var(--xu-font-sans);
  letter-spacing: -0.5px;
  line-height: 1.25;
  font-weight: 800;
  color: var(--xu-text-primary);
}
h1 { font-size: 34px; margin: 0.2rem 0 0.8rem; }
h2 {
  font-size: 22px;
  margin: 2.2rem 0 0.8rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--xu-border-subtle);
}
h3 { font-size: 17px; font-weight: 700; }

p { color: var(--xu-text-primary); }
p.lead {
  font-size: 18px;
  color: var(--xu-text-secondary);
  max-width: 720px;
  line-height: 1.6;
}

/* ==========================================================================
   首页 Hero 视觉专区 (Home Hero Stage)
   ========================================================================== */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 56px 24px 44px;
  background: radial-gradient(circle at top center, rgba(225, 29, 72, 0.22) 0%, transparent 64%);
  border-radius: var(--xu-radius-xl);
  border: 1px solid var(--xu-border-subtle);
  box-shadow: var(--xu-shadow-lg);
  margin-bottom: 36px;
  position: relative;
}
.hero img {
  width: 104px;
  height: 104px;
  filter: drop-shadow(0 0 36px rgba(225, 29, 72, 0.65));
  margin-bottom: 10px;
  transition: transform var(--xu-trans-fast);
}
.hero img:hover {
  transform: scale(1.05);
}
.hero h1 {
  font-size: 46px;
  font-weight: 900;
  letter-spacing: -1.5px;
  margin: 0 0 12px;
  background: var(--xu-brand-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: var(--xu-brand-500);
}
.hero .lead { margin: 0 auto 12px; }
.hero .banner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
  padding: 4px 12px;
  border-radius: var(--xu-radius-full);
  font-size: 12px;
  font-weight: 700;
  font-family: var(--xu-font-mono);
  background: rgba(225, 29, 72, 0.14);
  color: var(--xu-brand-glow);
  border: 1px solid rgba(225, 29, 72, 0.35);
}
[data-theme="light"] .hero .banner { color: var(--xu-brand-600); }
.hero .banner code {
  background: transparent;
  border: 0;
  padding: 0;
  color: inherit;
}

.ctas {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 18px 0 0;
}

/* ==========================================================================
   按钮系统 (Button System)
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--xu-radius-md);
  font-size: 14px;
  font-weight: 700;
  font-family: var(--xu-font-sans);
  cursor: pointer;
  border: none;
  outline: none;
  transition: all var(--xu-trans-fast);
  text-decoration: none;
  user-select: none;
  box-shadow: var(--xu-shadow-sm);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.98); }

.btn.pri, .btn-primary {
  background: var(--xu-brand-grad);
  color: #FFFFFF;
  box-shadow: 0 4px 16px rgba(225, 29, 72, 0.45);
}
.btn.pri:hover, .btn-primary:hover {
  box-shadow: 0 6px 24px rgba(255, 56, 92, 0.65);
  transform: translateY(-2px);
  color: #FFFFFF;
}

.btn.sec, .btn-secondary {
  background: var(--xu-bg-surface);
  color: var(--xu-text-primary);
  border: 1px solid var(--xu-border-medium);
}
.btn.sec:hover, .btn-secondary:hover {
  background: var(--xu-bg-elevated);
  border-color: var(--xu-border-highlight);
}

.btn.ghost, .btn-outline {
  background: transparent;
  color: var(--xu-brand-glow);
  border: 1px solid rgba(225, 29, 72, 0.5);
}
[data-theme="light"] .btn.ghost,
[data-theme="light"] .btn-outline {
  color: var(--xu-brand-600);
  border-color: var(--xu-brand-600);
}
.btn.ghost:hover, .btn-outline:hover {
  background: rgba(225, 29, 72, 0.12);
  border-color: var(--xu-brand-500);
}

.btn-danger {
  background: var(--xu-danger);
  color: #FFFFFF;
}
.btn-danger:hover {
  background: #DC2626;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4);
}

/* ==========================================================================
   核心支柱卡片 (Three Pillars Matrix)
   ========================================================================== */
.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin: 0 0 36px;
}
.pillar {
  background: var(--xu-bg-surface);
  border: 1px solid var(--xu-border-subtle);
  border-radius: var(--xu-radius-lg);
  padding: 26px;
  box-shadow: var(--xu-shadow-sm);
  transition: border-color var(--xu-trans-fast), box-shadow var(--xu-trans-fast), transform var(--xu-trans-fast);
}
.pillar:hover {
  border-color: var(--xu-border-highlight);
  box-shadow: var(--xu-shadow-glow);
  transform: translateY(-2px);
}
.pillar h2 {
  border: 0;
  padding: 0;
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pillar p {
  margin: 0;
  color: var(--xu-text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

.targets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 1.4rem 0 0.6rem;
}
.targets span {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--xu-radius-full);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--xu-font-mono);
  background: var(--xu-bg-surface);
  border: 1px solid var(--xu-border-subtle);
  color: var(--xu-text-secondary);
}

/* ==========================================================================
   代码块与语法高亮体系 (Code Blocks & Syntax Highlighting)
   ========================================================================== */
code, pre { font-family: var(--xu-font-mono); font-size: 0.92em; }
code {
  background: var(--xu-bg-canvas);
  color: var(--xu-brand-glow);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--xu-border-subtle);
}
[data-theme="light"] code { color: var(--xu-brand-600); }
pre {
  background: var(--xu-code-bg);
  color: var(--xu-code-text);
  padding: 16px;
  overflow: auto;
  border-radius: var(--xu-radius-md);
  border: 1px solid var(--xu-border-subtle);
  box-shadow: var(--xu-shadow-sm);
  font-size: 13px;
  line-height: 1.65;
}
pre code {
  background: none;
  border: 0;
  color: inherit;
  padding: 0;
}

.code-block-wrapper {
  background: var(--xu-code-bg);
  border: 1px solid var(--xu-border-subtle);
  border-radius: var(--xu-radius-md);
  overflow: hidden;
  font-family: var(--xu-font-mono);
  box-shadow: var(--xu-shadow-sm);
  margin: 1.2rem 0;
}
.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: var(--xu-code-header-bg);
  border-bottom: 1px solid var(--xu-border-subtle);
  font-size: 12px;
  font-weight: 700;
  color: var(--xu-text-muted);
}
.code-block-wrapper pre {
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

/* 官方 10 大核心语法高亮类 (Official Syntax Token Highlighting) */
.syn-kw { color: var(--xu-syn-kw); font-weight: 700; }
.syn-flow { color: var(--xu-syn-flow); font-weight: 800; }
.syn-type { color: var(--xu-syn-type); font-weight: 600; }
.syn-fn { color: var(--xu-syn-fn); }
.syn-str { color: var(--xu-syn-str); }
.syn-num { color: var(--xu-syn-num); }
.syn-cmt { color: var(--xu-syn-cmt); font-style: italic; }
.syn-borrow { color: var(--xu-syn-borrow); font-weight: 700; }
.syn-trait { color: var(--xu-syn-trait); font-weight: 700; }

/* 核心铁律：# 为库导入指令，严禁作为注释灰色渲染 */
.syn-import {
  color: var(--xu-syn-import);
  font-weight: 700;
}
.syn-import .hash {
  color: var(--xu-syn-import-hash);
  font-weight: 800;
  margin-right: 1px;
}

/* ==========================================================================
   浏览器 Wasm Playground 运行沙盒 (Playground Runner)
   ========================================================================== */
.xu-play {
  margin: 1.2rem 0 2rem;
  border: 1px solid var(--xu-border-medium);
  border-radius: var(--xu-radius-lg);
  box-shadow: var(--xu-shadow-md);
  overflow: hidden;
}
.xu-play-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  background: var(--xu-bg-surface);
  border-bottom: 1px solid var(--xu-border-subtle);
  font-size: 13px;
}
.xu-play-toolbar label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--xu-text-secondary);
  font-weight: 600;
}
.xu-play-toolbar select {
  background: var(--xu-bg-canvas);
  border: 1px solid var(--xu-border-subtle);
  color: var(--xu-text-primary);
  border-radius: 6px;
  padding: 4px 10px;
  font-family: var(--xu-font-mono);
  font-size: 12px;
  outline: none;
}
.xu-play-meta {
  color: var(--xu-text-muted);
  font-size: 12px;
  font-family: var(--xu-font-mono);
}
#xu-play-src {
  display: block;
  width: 100%;
  min-height: 180px;
  padding: 16px;
  border: 0;
  resize: vertical;
  background: var(--xu-code-bg);
  color: var(--xu-code-text);
  font-family: var(--xu-font-mono);
  font-size: 13.5px;
  line-height: 1.6;
  outline: none;
}
.xu-play-out {
  margin: 0;
  padding: 14px 16px;
  border: 0;
  border-top: 1px solid var(--xu-border-subtle);
  border-radius: 0;
  background: var(--xu-bg-void);
  color: var(--xu-syn-str);
  min-height: 80px;
  white-space: pre-wrap;
}
.xu-play-out.is-err { color: var(--xu-danger); }

/* ==========================================================================
   标准库 API 规范列表 (Stdlib API Items)
   ========================================================================== */
.api-item {
  margin: 1.4rem 0 0;
  padding: 1rem 0 1.3rem;
  border-bottom: 1px solid var(--xu-border-subtle);
}
.api-item:last-child { border-bottom: 0; }
.api-item h2 {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 0.6rem;
  border: 0;
  padding: 0;
  font-family: var(--xu-font-mono);
}
.api-item h2 code {
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--xu-text-primary);
  font-size: 16px;
}
.api-item h3 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--xu-text-muted);
  margin: 0.8rem 0 0.3rem;
  border: 0;
  padding: 0;
}
.api-item p {
  margin: 0.2rem 0 0;
  color: var(--xu-text-secondary);
  font-size: 14px;
  line-height: 1.6;
  max-width: 76ch;
}
.api-item .code-block-wrapper {
  margin: 0.5rem 0 0.4rem;
}
.api-item .code-block-wrapper pre {
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.55;
  margin: 0;
}
.api-item .code-block-header {
  padding: 6px 14px;
  font-size: 11px;
}
.api-params {
  display: grid;
  grid-template-columns: minmax(9rem, 18rem) 1fr;
  gap: 0.3rem 1rem;
  margin: 0.3rem 0 0;
  font-size: 13.5px;
  line-height: 1.5;
}
.api-params dt {
  font-family: var(--xu-font-mono);
  color: var(--xu-text-primary);
  margin: 0;
  padding: 0.12rem 0;
}
.api-params dd {
  margin: 0;
  color: var(--xu-text-secondary);
  padding: 0.12rem 0;
}
.api-params .type {
  color: var(--xu-syn-type);
  font-size: 12px;
  font-weight: 600;
  margin-left: 0.35rem;
  background: transparent;
  border: 0;
  padding: 0;
}
.api-none {
  color: var(--xu-text-muted);
  font-size: 13.5px;
  margin: 0.2rem 0 0;
}

/* ==========================================================================
   表格排版 (Tables)
   ========================================================================== */
table {
  border-collapse: collapse;
  width: 100%;
  margin: 1.2rem 0;
  font-size: 13.5px;
}
th, td {
  border-bottom: 1px solid var(--xu-border-subtle);
  padding: 10px 16px;
  text-align: left;
  vertical-align: top;
}
.doc-table-wrap { overflow-x: auto; }
.doc-table-wrap table {
  width: max-content;
  min-width: 100%;
}
.doc-table-wrap th,
.doc-table-wrap td { white-space: nowrap; }
th {
  color: var(--xu-text-muted);
  font-size: 12px;
  font-weight: 700;
  background: var(--xu-bg-surface);
}
tr:hover td { background: var(--xu-bg-elevated); }

/* ==========================================================================
   页脚 (Site Footer)
   ========================================================================== */
footer.site {
  border-top: 1px solid var(--xu-border-subtle);
  padding: 32px 24px 48px;
  text-align: center;
  background: var(--xu-bg-void);
  color: var(--xu-text-muted);
  font-size: 13px;
}
footer.site p {
  margin: 0;
  color: var(--xu-text-muted);
}

/* ==========================================================================
   SVG 图标规范 (Vector SVG Icon System - 替代 Emoji)
   ========================================================================== */
.xu-icon {
  display: inline-block;
  vertical-align: -0.15em;
  width: 1.1em;
  height: 1.1em;
  stroke-width: 2;
  stroke: currentColor;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.xu-icon.filled {
  fill: currentColor;
  stroke: none;
}
.xu-icon-sm {
  width: 0.9em;
  height: 0.9em;
}
.xu-icon-lg {
  width: 1.3em;
  height: 1.3em;
}
.xu-icon-brand {
  color: var(--xu-brand-500);
}
.xu-icon-gold {
  color: var(--xu-accent-amber);
}
.xu-icon-cyan {
  color: var(--xu-syn-import);
}
.xu-icon-green {
  color: var(--xu-success);
}

/* ==========================================================================
   响应式调整 (Responsive Design)
   ========================================================================== */
@media (max-width: 860px) {
  .header-bar {
    padding: 8px 16px;
  }
  .mobile-menu-btn {
    display: inline-flex;
  }
  .nav-tabs {
    display: none;
    position: fixed;
    top: 60px;
    left: 12px;
    right: 12px;
    background: var(--xu-bg-elevated);
    border: 1px solid var(--xu-border-medium);
    border-radius: var(--xu-radius-lg);
    box-shadow: var(--xu-shadow-lg);
    padding: 10px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    z-index: 1001;
  }
  body.mobile-nav-open .nav-tabs {
    display: flex;
    animation: mobileNavPop 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }
  .nav-tab-btn {
    padding: 10px 14px;
    font-size: 14.5px;
    border-radius: var(--xu-radius-md);
    justify-content: flex-start;
  }
  .nav-tab-btn i {
    font-size: 16px;
    width: 20px;
    text-align: center;
  }
  .page:has(aside.side) {
    grid-template-columns: 1fr;
  }
  aside.side {
    border-right: 0;
    border-bottom: 1px solid var(--xu-border-subtle);
    padding: 10px 16px 20px;
  }
  main.doc, main.home {
    padding: 24px 16px 60px;
  }
  .hero {
    padding: 36px 16px 32px;
  }
  .hero h1 {
    font-size: 34px;
  }
  .api-params {
    grid-template-columns: 1fr;
  }
  .api-params dd {
    padding-bottom: 0.45rem;
  }
}

@keyframes mobileNavPop {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 520px) {
  .header-bar { padding: 8px 12px; }
  .header-inner { gap: 8px; }
  .brand-wrapper { gap: 8px; }
  .brand-title { font-size: 17px; gap: 6px; }
  .header-controls { gap: 5px; }
  .header-social { display: none; }
  #theme-toggle-btn { width: 36px; padding: 0; }
  #theme-toggle-btn span { display: none; }
}

/* —— stdlib API pages —— */
.api-item {
  margin: 1.1rem 0 0;
  padding: 0.9rem 0 1.1rem;
  border-bottom: 1px solid var(--xu-border-subtle);
}
.api-item:last-child { border-bottom: 0; }
.api-item h2 {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 0.55rem;
  border: 0;
  padding: 0;
  font-family: var(--xu-font-mono);
  letter-spacing: 0;
}
.api-item h2 code {
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--xu-text-primary);
  font-size: 15px;
}
.api-item h3 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--xu-text-muted);
  margin: 0.7rem 0 0.28rem;
  border: 0;
  padding: 0;
}
.api-item p {
  margin: 0.15rem 0 0;
  color: var(--xu-text-secondary);
  font-size: 14px;
  line-height: 1.55;
  max-width: 72ch;
}
.api-item .code-block-wrapper {
  margin: 0.45rem 0 0.35rem;
}
.api-item .code-block-wrapper pre {
  padding: 10px 14px;
  font-size: 12.5px;
  line-height: 1.5;
  margin: 0;
}
.api-item .code-block-header {
  padding: 6px 12px;
  font-size: 11px;
}
.api-params {
  display: grid;
  grid-template-columns: minmax(9rem, 18rem) 1fr;
  gap: 0.2rem 1rem;
  margin: 0.2rem 0 0;
  font-size: 13.5px;
  line-height: 1.45;
}
.api-params dt {
  font-family: var(--xu-font-mono);
  color: var(--xu-text-primary);
  margin: 0;
  padding: 0.12rem 0;
}
.api-params dd {
  margin: 0;
  color: var(--xu-text-secondary);
  padding: 0.12rem 0;
}
.api-params .type {
  color: var(--xu-syn-type);
  font-size: 12px;
  font-weight: 500;
  margin-left: 0.35rem;
  background: transparent;
  border: 0;
  padding: 0;
}
.api-none {
  color: var(--xu-text-muted);
  font-size: 13.5px;
  margin: 0.15rem 0 0;
}
main.doc .lead {
  color: var(--xu-text-secondary);
  font-size: 15px;
  max-width: 72ch;
}
@media (max-width: 700px) {
  .api-params { grid-template-columns: 1fr; }
  .api-params dd { padding-bottom: 0.45rem; }
}

/* ==========================================================================
   XuIcons 视觉平衡与尺寸自适应增强 (Icon Ergonomics & Scale Tuning)
   ========================================================================== */

/* 导航栏图标 */
.nav-tab-btn i.xi {
  font-size: 16px;
  line-height: 1;
}

/* 顶部操作区 */
.icon-btn i.xi {
  font-size: 18px;
  line-height: 1;
}

/* 按钮图标 */
.btn i.xi {
  font-size: 18px;
  line-height: 1;
}

/* Banner 徽章图标 */
.hero .banner i.xi {
  font-size: 15px;
  line-height: 1;
}

/* 支柱特性卡片大徽标 */
.pillar h2 span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 12px;
  background: var(--xu-brand-grad-subtle);
  border: 1px solid var(--xu-border-highlight);
  margin-right: 12px;
  flex-shrink: 0;
  padding: 0;
  line-height: 1;
  text-align: center;
  box-sizing: border-box;
}
.pillar h2 span i.xi {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
  width: auto;
  height: auto;
  margin: 0 !important;
  padding: 0 !important;
  vertical-align: middle !important;
  text-align: center;
}
.pillar h2 span i.xi:before {
  display: block;
  line-height: 1;
  margin: 0 !important;
  padding: 0 !important;
}

/* 大标题与副标题直接子图标（不影响嵌套在 span 徽标内的图标） */
h1 > i.xi {
  font-size: 1.15em;
  margin-right: 8px;
  vertical-align: -0.1em;
}
h2 > i.xi {
  font-size: 1.2em;
  margin-right: 8px;
  vertical-align: -0.1em;
}
h3 > i.xi {
  font-size: 1.2em;
  margin-right: 6px;
  vertical-align: -0.1em;
}

/* 侧边栏标题图标与多行排版 */
.side-h {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 18px 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--xu-text-primary);
  line-height: 1.4;
}
.side-h i.xi {
  font-size: 17px;
  line-height: 1;
  color: var(--xu-brand-glow);
  margin-top: 1px;
  flex-shrink: 0;
}
.side-h span {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.side-h small {
  display: block;
  font-size: 11px;
  font-weight: normal;
  color: var(--xu-text-muted);
  line-height: 1.35;
  margin-top: 2px;
  text-transform: none;
  letter-spacing: normal;
}

/* 页脚图标 */
footer.site i.xi {
  font-size: 16px;
  vertical-align: -0.12em;
}

/* Playground 工具栏按钮图标 */
#xu-play-run i.xi {
  font-size: 16px;
}

/* ==========================================================================
   基准测试横测专区 (Benchmark Page & Tables)
   ========================================================================== */
.bench-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}
.bench-hero {
  margin-bottom: 24px;
}
.bench-desc {
  font-size: 11.5px;
  color: var(--xu-text-muted);
  margin-top: 2px;
}
.bench-table th, .bench-table td {
  padding: 8px 14px;
}
.bench-cat-header th {
  background: var(--xu-bg-elevated);
  color: var(--xu-brand-text);
  font-size: 13px;
  font-weight: 700;
  border-top: 1px solid var(--xu-border-medium);
  padding: 10px 14px;
}
.bench-xu-col {
  color: var(--xu-brand-text);
  font-weight: 700;
  background: rgba(224, 90, 43, 0.05);
}
.bench-ratio-col {
  text-align: right;
}
.bench-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: var(--xu-radius-sm);
  font-size: 11px;
  font-family: var(--xu-font-mono);
  font-weight: 700;
}
.bench-badge-fast {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}
.bench-badge-close {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.3);
}
.bench-badge-mid {
  background: rgba(234, 179, 8, 0.15);
  color: #eab308;
  border: 1px solid rgba(234, 179, 8, 0.3);
}
.bench-badge-slow {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* 平台与架构选项卡 (Multi-Arch Tabs) */
.bench-tabs-wrapper {
  position: sticky;
  top: 56px;
  z-index: 80;
  background: color-mix(in srgb, var(--xu-bg-body) 92%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 12px 0 10px;
  margin: 24px 0 20px;
  border-bottom: 1px solid var(--xu-border-subtle);
}
.bench-tabs-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}
.bench-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--xu-radius-md);
  background: var(--xu-bg-surface);
  color: var(--xu-text-secondary);
  border: 1px solid var(--xu-border-subtle);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--xu-trans-fast);
}
.bench-tab-btn:hover {
  background: var(--xu-bg-elevated);
  color: var(--xu-text-primary);
  border-color: var(--xu-border-medium);
}
.bench-tab-btn.active {
  background: rgba(224, 90, 43, 0.12);
  color: var(--xu-brand-text, #e05a2b);
  border-color: var(--xu-brand, #e05a2b);
  box-shadow: 0 0 12px rgba(224, 90, 43, 0.2);
}
.bench-tab-btn .btn-arch {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 4px;
  font-family: var(--xu-font-mono);
  font-weight: 700;
  text-transform: uppercase;
}
.bench-tab-btn .btn-arch.arch-arm {
  background: rgba(168, 85, 247, 0.14);
  color: #a855f7;
}
.bench-tab-btn .btn-arch.arch-x64 {
  background: rgba(14, 165, 233, 0.14);
  color: #0ea5e9;
}
.bench-tab-pane {
  display: none;
}
.bench-tab-pane.active {
  display: block;
  animation: benchFadeIn 0.22s ease-out;
}
@keyframes benchFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 跨架构对比卡片 (Cross-Arch Overview Card) */
.bench-cross-arch {
  margin: 28px 0 36px;
  background: var(--xu-bg-surface);
  border: 1px solid var(--xu-border-subtle);
  border-radius: var(--xu-radius-lg);
  padding: 24px;
  box-shadow: var(--xu-shadow-sm);
}
.bench-cross-arch-header {
  margin-bottom: 16px;
}
.bench-cross-arch-header h3 {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.bench-platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--xu-radius-sm);
  background: var(--xu-bg-elevated);
  border: 1px solid var(--xu-border-subtle);
  font-size: 12px;
  font-weight: 600;
}

/* ==========================================================================
   可视化图形图表看板 (Visual Benchmark Charts & Progress Bars)
   ========================================================================== */
.bench-visual-dashboard {
  margin: 32px 0 40px;
}
.bench-chart-section-title {
  font-size: 19px;
  font-weight: 700;
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.bench-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 16px;
}
@media (max-width: 860px) {
  .bench-chart-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}
.bench-chart-card {
  background: var(--xu-bg-surface);
  border: 1px solid var(--xu-border-subtle);
  border-radius: var(--xu-radius-lg);
  padding: 16px 18px;
  box-shadow: var(--xu-shadow-xs);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.bench-chart-card:hover {
  border-color: var(--xu-primary-dim, #6366f1);
  box-shadow: var(--xu-shadow-md);
  transform: translateY(-2px);
}
.bench-chart-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--xu-border-subtle);
}
.bench-chart-card-title {
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.bench-chart-card-unit {
  font-size: 11px;
  color: var(--xu-text-muted);
  font-family: var(--xu-font-mono);
  background: var(--xu-bg-elevated);
  padding: 2px 6px;
  border-radius: 4px;
}
.bench-chart-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bench-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}
.bench-bar-lang {
  width: 126px;
  font-weight: 600;
  font-family: var(--xu-font-mono);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  text-align: right;
  gap: 6px;
  flex-shrink: 0;
  white-space: nowrap;
}
.bench-bar-lang.xu {
  color: #6366f1;
  font-weight: 700;
}
.bench-bar-lang.c {
  color: #0284c7;
}
.bench-bar-lang.rs {
  color: #ea580c;
}
.bench-bar-lang.go {
  color: #0891b2;
}
.bench-bar-lang.swift {
  color: #f43f5e;
}
.bench-bar-track {
  flex: 1;
  height: 18px;
  background: var(--xu-bg-subtle, rgba(0, 0, 0, 0.05));
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
}
.bench-bar-fill {
  height: 100%;
  border-radius: 5px;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  min-width: 3px;
}
.bench-bar-fill.xu {
  background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 100%);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.35);
}
.bench-bar-fill.c {
  background: linear-gradient(90deg, #0284c7 0%, #38bdf8 100%);
}
.bench-bar-fill.rs {
  background: linear-gradient(90deg, #ea580c 0%, #fb923c 100%);
}
.bench-bar-fill.go {
  background: linear-gradient(90deg, #0891b2 0%, #22d3ee 100%);
}
.bench-bar-fill.swift {
  background: linear-gradient(90deg, #e11d48 0%, #fb7185 100%);
}
.bench-bar-val {
  width: 104px;
  font-family: var(--xu-font-mono);
  font-size: 11px;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  flex-shrink: 0;
  white-space: nowrap;
  color: var(--xu-text-subtle);
}
.bench-bar-val strong {
  color: var(--xu-text);
  font-weight: 700;
}
.bench-bar-val .lead-tag {
  color: #10b981;
  font-weight: 700;
  margin-left: 2px;
}
@media (max-width: 520px) {
  .bench-bar-lang {
    width: 96px;
    font-size: 11px;
  }
  .bench-bar-val {
    width: 84px;
    font-size: 10px;
  }
}

/* Bench SVG Icons replacing emojis */
.bench-icon {
  display: inline-block;
  vertical-align: -0.16em;
  margin-right: 6px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.bench-icon-bolt {
  color: #f59e0b;
}
.bench-icon-brain {
  color: #8b5cf6;
}
.bench-icon-box {
  color: #06b6d4;
}
.bench-chart-card:hover .bench-icon {
  transform: scale(1.1);
}

/* ==========================================================================
   全平台跨架构对比柱状条色彩体系 (Cross-Platform Bar Chart Colors)
   ========================================================================== */
.bench-bar-lang.p-macos-arm64, .bench-bar-fill.p-macos-arm64 {
  color: #a855f7;
}
.bench-bar-fill.p-macos-arm64 {
  background: linear-gradient(90deg, #9333ea 0%, #c084fc 100%);
}
.bench-bar-lang.p-linux-arm64, .bench-bar-fill.p-linux-arm64 {
  color: #ea580c;
}
.bench-bar-fill.p-linux-arm64 {
  background: linear-gradient(90deg, #ea580c 0%, #fb923c 100%);
}
.bench-bar-lang.p-windows-arm64, .bench-bar-fill.p-windows-arm64 {
  color: #06b6d4;
}
.bench-bar-fill.p-windows-arm64 {
  background: linear-gradient(90deg, #0891b2 0%, #22d3ee 100%);
}
.bench-bar-lang.p-macos-x64, .bench-bar-fill.p-macos-x64 {
  color: #64748b;
}
.bench-bar-fill.p-macos-x64 {
  background: linear-gradient(90deg, #64748b 0%, #94a3b8 100%);
}
.bench-bar-lang.p-linux-x64, .bench-bar-fill.p-linux-x64 {
  color: #d97706;
}
.bench-bar-fill.p-linux-x64 {
  background: linear-gradient(90deg, #d97706 0%, #fcd34d 100%);
}
.bench-bar-lang.p-windows-x64, .bench-bar-fill.p-windows-x64 {
  color: #0284c7;
}
.bench-bar-fill.p-windows-x64 {
  background: linear-gradient(90deg, #0284c7 0%, #38bdf8 100%);
}

/* 平台工作区头部信息条 (Platform Pane Header) */
.bench-pane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background: var(--xu-bg-surface);
  border: 1px solid var(--xu-border-subtle);
  border-radius: var(--xu-radius-md);
  padding: 12px 18px;
  margin-bottom: 24px;
}
.bench-pane-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
}
.bench-pane-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--xu-text-secondary);
}

/* 表格即时搜索与分类筛选控制栏 (Table Toolbar & Filter Chips) */
.bench-table-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 16px;
  padding: 12px 16px;
  background: var(--xu-bg-surface);
  border: 1px solid var(--xu-border-subtle);
  border-radius: var(--xu-radius-md);
}
.bench-cat-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.bench-filter-btn {
  padding: 5px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--xu-border-subtle);
  background: var(--xu-bg-elevated);
  color: var(--xu-text-secondary);
  cursor: pointer;
  transition: all 0.16s ease;
}
.bench-filter-btn:hover {
  color: var(--xu-text-primary);
  border-color: var(--xu-border-medium);
}
.bench-filter-btn.active {
  background: var(--xu-brand, #e05a2b);
  color: #fff;
  border-color: var(--xu-brand, #e05a2b);
  box-shadow: 0 0 10px rgba(224, 90, 43, 0.3);
}
.bench-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 240px;
}
.bench-search-input {
  width: 100%;
  padding: 7px 12px 7px 32px;
  font-size: 12px;
  border-radius: 6px;
  border: 1px solid var(--xu-border-subtle);
  background: var(--xu-bg-elevated);
  color: var(--xu-text-primary);
  outline: none;
  transition: all 0.2s ease;
}
.bench-search-input:focus {
  border-color: var(--xu-brand, #e05a2b);
  box-shadow: 0 0 0 3px rgba(224, 90, 43, 0.15);
}
.bench-search-icon {
  position: absolute;
  left: 10px;
  color: var(--xu-text-subtle);
  pointer-events: none;
}

/* 47 项大表格的粘性吸顶表头 */
.bench-table-wrap {
  border: 1px solid var(--xu-border-subtle);
  border-radius: var(--xu-radius-md);
  max-height: 800px;
  overflow-y: auto;
}
.bench-table thead th {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--xu-bg-surface);
  box-shadow: 0 1px 0 var(--xu-border-subtle);
}

/* ==========================================================================
   功能大类流式平铺工作区样式 (Functional Category Stream & Anchor Nav)
   ========================================================================== */
.bench-sticky-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 8px;
}
.bench-anchor-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--xu-border-subtle);
}
.bench-anchor-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  overflow-x: auto;
  scrollbar-width: thin;
}
.bench-anchor-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 999px;
  background: var(--xu-bg-surface);
  color: var(--xu-text-secondary);
  border: 1px solid var(--xu-border-subtle);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--xu-trans-fast);
  white-space: nowrap;
}
.bench-anchor-pill:hover {
  background: var(--xu-bg-elevated);
  color: var(--xu-brand, #e05a2b);
  border-color: var(--xu-brand, #e05a2b);
  transform: translateY(-1px);
}
.bench-anchor-pill .badge {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 999px;
  background: var(--xu-bg-elevated);
  color: var(--xu-text-muted);
}
.bench-anchor-pill:hover .badge {
  background: rgba(224, 90, 43, 0.15);
  color: var(--xu-brand, #e05a2b);
}
.bench-search-global {
  min-width: 200px;
  flex: 0 1 240px;
}

/* 功能大类独立卡片 (Functional Category Card) */
.bench-cat-section {
  margin: 28px 0 24px;
  background: var(--xu-bg-surface);
  border: 1px solid var(--xu-border-subtle);
  border-radius: var(--xu-radius-lg);
  padding: 22px 24px;
  box-shadow: var(--xu-shadow-xs);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.bench-cat-section:hover {
  border-color: var(--xu-border-medium);
  box-shadow: var(--xu-shadow-sm);
}
.bench-cat-section-header {
  margin-bottom: 16px;
}
.bench-cat-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.bench-cat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(224, 90, 43, 0.12);
  color: var(--xu-brand, #e05a2b);
  flex-shrink: 0;
}
.bench-cat-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--xu-text-primary);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.bench-cat-count {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--xu-bg-elevated);
  color: var(--xu-text-muted);
  border: 1px solid var(--xu-border-subtle);
}
.bench-cat-desc {
  margin: 0;
  font-size: 13px;
  color: var(--xu-text-secondary);
  line-height: 1.5;
}

/* ==========================================================================
   算法独立全平台全语言对比区块 (Workload Block)
   ========================================================================== */
.bench-workload-block {
  margin: 16px 0 22px;
  background: var(--xu-bg-surface);
  border: 1px solid var(--xu-border-subtle);
  border-radius: var(--xu-radius-lg);
  box-shadow: var(--xu-shadow-xs);
  overflow: hidden;
  transition: border-color var(--xu-trans-fast), box-shadow var(--xu-trans-fast);
}
.bench-workload-block:hover {
  border-color: var(--xu-border-medium);
  box-shadow: var(--xu-shadow-sm);
}

.bench-workload-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 18px;
  background: var(--xu-bg-elevated);
  border-bottom: 1px solid var(--xu-border-subtle);
}

.bench-workload-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.bench-workload-code {
  font-family: var(--xu-font-mono);
  font-size: 13.5px;
  font-weight: 700;
  padding: 2px 8px;
  background: rgba(225, 29, 72, 0.12);
  color: var(--xu-brand, #e05a2b);
  border-radius: var(--xu-radius-sm);
  border: 1px solid rgba(225, 29, 72, 0.25);
}

.bench-workload-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--xu-text-primary);
}

.bench-workload-cat-pill {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--xu-bg-surface);
  color: var(--xu-text-muted);
  border: 1px solid var(--xu-border-subtle);
}

.bench-workload-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.bench-meta-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--xu-bg-surface);
  border: 1px solid var(--xu-border-subtle);
  color: var(--xu-text-secondary);
}

.bench-meta-fastest strong {
  color: #10b981;
}

.bench-workload-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  margin: 0;
}

.bench-workload-table th {
  background: var(--xu-bg-surface);
  color: var(--xu-text-secondary);
  font-weight: 700;
  font-size: 11.5px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--xu-border-subtle);
  text-align: left;
}

.bench-workload-table td {
  padding: 8px 14px;
  border-bottom: 1px solid var(--xu-border-subtle);
  color: var(--xu-text-secondary);
}

.bench-workload-table tr:last-child td {
  border-bottom: none;
}

.bench-workload-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.bench-row-fastest td {
  background: rgba(16, 185, 129, 0.04);
}

.bench-td-platform {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.bench-chip-label {
  font-size: 11px;
  color: var(--xu-text-muted);
}



