/* foundu 人才库文档中心 — 静态文档站样式
   布局与样式语言借鉴 SSOS docs-site；改用本地字体栈、浅色主题与 foundu 品牌色（专业蓝 hsl(226 60% 45%)）。
   纯静态，无任何外部 CDN / webfont 依赖。 */

:root {
  --background: 220 25% 98%;
  --foreground: 224 30% 13%;
  --card: 0 0% 100%;
  --primary: 226 60% 45%;
  --primary-dark: 226 65% 36%;
  --primary-light: 226 60% 95%;
  --muted: 224 20% 96%;
  --muted-foreground: 224 12% 45%;
  --border: 224 18% 89%;
  --input: 224 18% 89%;
  --ring: 226 60% 45%;
  --success: 142 50% 40%;
  --warning: 38 92% 42%;
  --radius: 0.5rem;
  --gradient-brand: linear-gradient(135deg, hsl(226 60% 45%) 0%, hsl(242 58% 56%) 100%);
  --gradient-hero: linear-gradient(180deg, hsl(220 25% 98%) 0%, hsl(226 60% 95%) 100%);
  --shadow-sm: 0 1px 2px 0 hsl(224 25% 50% / 0.10);
  --shadow-md: 0 2px 4px -1px hsl(224 25% 50% / 0.08), 0 4px 8px -2px hsl(224 25% 50% / 0.06);
  --shadow-lg: 0 4px 6px -2px hsl(226 60% 45% / 0.08), 0 10px 20px -5px hsl(226 60% 45% / 0.12);
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --sidebar-w: 260px;
  --toc-w: 210px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-sans);
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { line-height: 1.35; }
h1 { font-size: clamp(1.75rem, 4vw, 2.15rem); font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.25rem, 3vw, 1.5rem); font-weight: 600; margin-top: 2.5rem; margin-bottom: 0.75rem; }
h3 { font-size: 1.08rem; font-weight: 600; margin-top: 1.75rem; margin-bottom: 0.5rem; }
p { margin-bottom: 1rem; }
a { color: hsl(var(--primary-dark)); text-decoration: none; transition: color 0.15s; }
a:hover { color: hsl(var(--primary)); }
ul, ol { padding-left: 1.5rem; margin-bottom: 1rem; }
li { margin-bottom: 0.3rem; }
code { font-size: 0.88em; background: hsl(var(--muted)); padding: 0.12em 0.38em; border-radius: 4px; font-family: var(--font-mono); }
pre { background: hsl(224 30% 12%); color: hsl(220 25% 94%); padding: 1rem 1.1rem; border-radius: var(--radius); overflow-x: auto; margin-bottom: 1rem; line-height: 1.55; }
pre code { background: none; padding: 0; color: inherit; font-size: 0.86rem; }
table { width: 100%; border-collapse: collapse; margin-bottom: 1.25rem; }
.responsive-table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
th, td { padding: 0.6rem 0.8rem; border: 1px solid hsl(var(--border)); text-align: left; font-size: 0.9rem; vertical-align: top; }
th { background: hsl(var(--muted)); font-weight: 600; }
blockquote { border-left: 4px solid hsl(var(--ring)); padding: 0.5rem 1rem; margin: 1rem 0; background: hsl(var(--muted)); border-radius: 0 var(--radius) var(--radius) 0; }
img { max-width: 100%; height: auto; border-radius: var(--radius); }

/* Top nav */
.topnav {
  position: sticky; top: 0; z-index: 200;
  background: hsl(var(--card) / 0.9);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid hsl(var(--border));
  height: 56px;
}
.topnav-inner {
  max-width: 1480px; margin: 0 auto; padding: 0 1.25rem;
  display: flex; align-items: center; height: 100%; gap: 1rem;
}
.topnav-logo {
  font-weight: 700; font-size: 1rem; color: hsl(var(--foreground));
  display: inline-flex; align-items: center; gap: 0.55rem; white-space: nowrap;
}
.topnav-logo .logo-mark {
  width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0;
  background: var(--gradient-brand); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.92rem; font-weight: 800; letter-spacing: -0.02em;
}
.topnav-logo .logo-sub { color: hsl(var(--muted-foreground)); font-weight: 500; font-size: 0.86rem; }
.topnav-right { margin-left: auto; display: flex; align-items: center; gap: 0.6rem; }
.topnav-tag {
  font-size: 0.74rem; font-weight: 600; color: hsl(var(--primary-dark));
  background: hsl(var(--primary-light)); padding: 0.22rem 0.6rem; border-radius: 50px;
}
.mobile-toggle {
  display: none; background: hsl(var(--card)); border: 1px solid hsl(var(--border));
  border-radius: 0.5rem; width: 34px; height: 34px; align-items: center; justify-content: center;
  color: hsl(var(--foreground)); cursor: pointer;
}
.ui-icon { width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* Layout */
.app-layout { display: flex; max-width: 1480px; margin: 0 auto; min-height: calc(100vh - 56px); }

/* Sidebar */
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  border-right: 1px solid hsl(var(--border)); background: hsl(var(--card));
  position: sticky; top: 56px; height: calc(100vh - 56px);
  overflow-y: auto; padding: 1.4rem 0 3rem; -webkit-overflow-scrolling: touch;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: hsl(var(--border)); border-radius: 4px; }
.sidebar-section { margin-bottom: 0.5rem; }
.sidebar-section-header { display: flex; align-items: center; min-height: 2.1rem; }
.sidebar-category-label {
  padding: 0.5rem 1.25rem 0.5rem 1.25rem; font-size: 0.74rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em; color: hsl(var(--muted-foreground));
}
.sidebar-items { list-style: none; padding: 0; margin: 0; }
.sidebar-items li a {
  display: block; padding: 0.5rem 1.25rem 0.5rem 1.5rem; font-size: 0.9rem;
  color: hsl(var(--muted-foreground)); border-left: 2px solid transparent;
  transition: all 0.12s; line-height: 1.5;
}
.sidebar-items li a:hover { color: hsl(var(--foreground)); background: hsl(var(--muted)); text-decoration: none; }
.sidebar-items li a.active {
  color: hsl(var(--primary-dark)); background: hsl(var(--primary-light));
  border-left-color: hsl(var(--ring)); font-weight: 600;
}
.sidebar-desc { display: block; font-size: 0.74rem; color: hsl(var(--muted-foreground)); margin-top: 0.1rem; font-weight: 400; }

/* Main */
.main-content { flex: 1; min-width: 0; padding: 2.4rem clamp(1.25rem, 4vw, 3.25rem) 5rem; }
.content-header { border-bottom: 1px solid hsl(var(--border)); padding-bottom: 1.2rem; margin-bottom: 2rem; }
.content-header h1 { margin-bottom: 0.3rem; }
.content-header .subtitle { color: hsl(var(--muted-foreground)); font-size: 0.95rem; }

/* TOC */
.page-toc {
  width: var(--toc-w); flex-shrink: 0; position: sticky; top: 80px;
  max-height: calc(100vh - 104px); overflow-y: auto; height: fit-content;
  padding: 1.5rem 0.75rem 2rem 1rem; font-size: 0.8rem;
  border-left: 1px solid hsl(var(--border)); margin: 1rem 0 0;
}
.toc-title { font-size: 0.76rem; font-weight: 700; color: hsl(var(--foreground)); padding: 0 0.75rem 0.6rem; }
.page-toc ul { list-style: none; padding: 0; margin: 0; }
.page-toc li a {
  display: block; padding: 0.26rem 0.75rem; color: hsl(var(--muted-foreground));
  border-left: 2px solid transparent; transition: all 0.12s; line-height: 1.45; font-size: 0.8rem;
}
.page-toc li a.toc-level-3 { padding-left: 1.4rem; font-size: 0.76rem; }
.page-toc li a:hover, .page-toc li a.active { color: hsl(var(--foreground)); border-left-color: hsl(var(--ring)); text-decoration: none; }

/* Cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.2rem; margin-top: 1.5rem; }
.card {
  background: hsl(var(--card)); border: 1px solid hsl(var(--border)); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow-md); transition: box-shadow 0.25s, transform 0.25s;
  color: inherit; display: block;
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); text-decoration: none; }
.card-icon {
  width: 44px; height: 44px; border-radius: 0.65rem; background: hsl(var(--primary-light));
  color: hsl(var(--primary-dark)); display: flex; align-items: center; justify-content: center; margin-bottom: 0.85rem;
}
.card-icon svg { width: 1.35rem; height: 1.35rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { margin: 0 0 0.35rem; font-size: 1.05rem; color: hsl(var(--foreground)); }
.card p { font-size: 0.88rem; color: hsl(var(--muted-foreground)); margin-bottom: 0; line-height: 1.6; }
.card-link { display: inline-flex; align-items: center; gap: 0.3rem; margin-top: 0.85rem; font-size: 0.85rem; font-weight: 600; color: hsl(var(--primary-dark)); }
.card-link::after { content: ''; width: 0.46rem; height: 0.46rem; border-top: 1.8px solid currentColor; border-right: 1.8px solid currentColor; transform: rotate(45deg); }
.card:hover .card-link { color: hsl(var(--primary)); }

/* Badge */
.badge { display: inline-block; font-size: 0.7rem; padding: 0.1rem 0.5rem; border-radius: 50px; font-weight: 600; vertical-align: middle; }
.badge-new { background: hsl(var(--primary-light)); color: hsl(var(--primary-dark)); }
.badge-soon { background: hsl(45 93% 47% / 0.16); color: hsl(38 80% 32%); }

/* Callout */
.callout { background: hsl(var(--muted)); border-left: 4px solid hsl(var(--ring)); padding: 0.9rem 1.2rem; border-radius: 0 var(--radius) var(--radius) 0; margin: 1.5rem 0; font-size: 0.92rem; }
.callout p:last-child { margin-bottom: 0; }
.callout-warn { background: hsl(45 93% 47% / 0.10); border-left-color: hsl(var(--warning)); }
.callout-note { background: hsl(var(--primary-light)); border-left-color: hsl(var(--primary)); }

/* Steps */
.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li { counter-increment: step; position: relative; padding-left: 2.8rem; margin-bottom: 1.2rem; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 1.75rem; height: 1.75rem; background: var(--gradient-brand); color: #fff;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700;
}

/* Section divider */
.section-divider { margin: 3rem 0 1.25rem; }
.section-divider h2 { margin-bottom: 0.2rem; }
.section-divider p { color: hsl(var(--muted-foreground)); font-size: 0.9rem; }

/* Hero */
.hero { text-align: center; padding: 3.5rem 1.5rem 2.75rem; background: var(--gradient-hero); border-bottom: 1px solid hsl(var(--border)); }
.hero h1 { font-size: clamp(2rem, 5vw, 2.7rem); margin-bottom: 0.6rem; }
.hero h1 .brand { background: var(--gradient-brand); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero p { font-size: 1.05rem; color: hsl(var(--muted-foreground)); max-width: 640px; margin: 0 auto; }

/* Meta list (definition-ish) */
.meta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0.9rem; margin: 1.25rem 0 0; }
.meta-item { background: hsl(var(--card)); border: 1px solid hsl(var(--border)); border-radius: var(--radius); padding: 0.9rem 1.1rem; box-shadow: var(--shadow-sm); }
.meta-item .meta-label { font-size: 0.75rem; color: hsl(var(--muted-foreground)); font-weight: 600; letter-spacing: 0.02em; }
.meta-item .meta-value { font-size: 0.95rem; font-weight: 600; margin-top: 0.2rem; }

/* Placeholder block */
.placeholder-block {
  border: 2px dashed hsl(var(--border)); border-radius: var(--radius);
  background: hsl(var(--muted)); color: hsl(var(--muted-foreground));
  padding: 1.5rem; text-align: center; margin: 1.25rem 0;
}
.placeholder-block strong { color: hsl(var(--foreground)); }
.placeholder-row td { color: hsl(var(--muted-foreground)); font-style: italic; }

/* Footer */
.footer { border-top: 1px solid hsl(var(--border)); padding: 1.5rem 1.5rem 2.5rem; color: hsl(var(--muted-foreground)); font-size: 0.82rem; background: hsl(var(--muted)); }
.footer-inner { max-width: 1480px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; align-items: center; justify-content: space-between; }
.footer-brand { font-weight: 600; color: hsl(var(--foreground)); }

/* Responsive */
@media (max-width: 1200px) { .page-toc { display: none; } }
@media (max-width: 860px) {
  :root { --sidebar-w: 0px; }
  .sidebar {
    position: fixed; top: 0; left: 0; z-index: 300; width: 280px; height: 100vh;
    transform: translateX(-100%); transition: transform 0.25s ease; box-shadow: var(--shadow-lg);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay { display: none; position: fixed; inset: 0; z-index: 299; background: rgba(0,0,0,0.3); }
  .sidebar-overlay.show { display: block; }
  .sidebar-close {
    display: inline-flex; align-items: center; justify-content: center; position: absolute; top: 0.75rem; right: 0.75rem;
    width: 34px; height: 34px; background: hsl(var(--card)); border: 1px solid hsl(var(--border)); border-radius: 0.5rem;
    cursor: pointer; color: hsl(var(--muted-foreground));
  }
  .mobile-toggle { display: inline-flex; }
  .topnav-inner { padding: 0 0.85rem; }
  .main-content { padding: 1.5rem 1rem 4rem; }
  .card-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  html { font-size: 15px; }
  .topnav-logo .logo-sub { display: none; }
  .hero { padding: 2.5rem 1rem 2rem; }
}
