/* ===== WorkBuddy 知识中心 · 共享样式（与首页同色系） ===== */
:root{
  --bg:#f6f7fb; --surface:#fff; --surface-2:#f1f3f9;
  --text:#1f2430; --muted:#677184; --line:#e6e9f0;
  --primary:#4f46e5; --primary-soft:#eef0ff;
  --accent:#10b981; --accent-soft:#e7f8f1;
  --warm:#f59e0b; --warm-soft:#fef3e2;
  --radius:18px;
  --shadow:0 10px 30px rgba(31,36,48,.06);
  --shadow-lg:0 18px 50px rgba(31,36,48,.10);
  --max:1080px;
  --font:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
}
*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{font-family:var(--font);background:var(--bg);color:var(--text);line-height:1.75;-webkit-font-smoothing:antialiased}
a{color:inherit;text-decoration:none}
.wrap{max-width:var(--max);margin:0 auto;padding:0 22px}
.muted{color:var(--muted)}
.pill{display:inline-block;font-size:13px;font-weight:600;padding:5px 12px;border-radius:999px;background:var(--primary-soft);color:var(--primary)}
.pill.green{background:var(--accent-soft);color:var(--accent)}
.pill.warm{background:var(--warm-soft);color:var(--warm)}

.topbar{background:var(--text);color:#cdd2e0;font-size:12.5px;text-align:center;padding:8px 16px;line-height:1.5}
.topbar b{color:#fff}
header{position:sticky;top:0;z-index:50;background:rgba(255,255,255,.82);backdrop-filter:saturate(160%) blur(12px);border-bottom:1px solid var(--line)}
.nav{display:flex;align-items:center;justify-content:space-between;height:64px;flex-wrap:wrap;gap:8px}
.brand{display:flex;align-items:center;gap:11px;font-weight:800;font-size:18px;letter-spacing:.2px}
.brand .logo{width:42px;height:34px;border-radius:10px;background:linear-gradient(135deg,var(--primary),#7c7bff);color:#fff;display:grid;place-items:center;font-size:17px;font-weight:900;box-shadow:0 6px 16px rgba(79,70,229,.35)}
.brand small{display:block;font-size:11px;font-weight:600;color:var(--muted);letter-spacing:.5px}
.nav-right{display:flex;align-items:center;gap:10px}
.nav-links{display:flex;gap:22px;font-size:15px;font-weight:600;color:var(--muted)}
.nav-links a{transition:color .2s}
.nav-links a:hover,.nav-links a.active{color:var(--primary)}
.nav-cta{background:var(--primary);color:#fff;padding:9px 16px;border-radius:11px;font-weight:700;font-size:14px;box-shadow:0 8px 18px rgba(79,70,229,.3);transition:transform .15s;white-space:nowrap}
.nav-cta:hover{transform:translateY(-1px)}
.lang-switch{background:var(--primary-soft);color:var(--primary);padding:9px 13px;border-radius:11px;font-weight:700;font-size:14px;transition:background .2s,color .2s}
.lang-switch:hover{background:var(--primary);color:#fff}
.menu-btn{display:none;background:none;border:1px solid var(--line);border-radius:10px;padding:8px 10px;font-size:18px;cursor:pointer}

/* hero */
.hero{padding:58px 0 34px;background:
  radial-gradient(900px 380px at 85% -10%,rgba(79,70,229,.10),transparent),
  radial-gradient(700px 320px at 0% 10%,rgba(16,185,129,.08),transparent);}
.hero h1{font-size:40px;line-height:1.22;font-weight:850;letter-spacing:-.5px;margin:14px 0 14px}
.hero h1 span{background:linear-gradient(120deg,var(--primary),#22c7a9);-webkit-background-clip:text;background-clip:text;color:transparent}
.hero p.lead{font-size:17px;color:var(--muted);max-width:640px}
.breadcrumb{font-size:13.5px;color:var(--muted);margin:6px 0 0;display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.breadcrumb a:hover{color:var(--primary)}
.breadcrumb .sep{opacity:.5}

section{padding:46px 0}
.sec-head{margin-bottom:26px;max-width:720px}
.sec-head h2{font-size:27px;font-weight:850;letter-spacing:-.4px;margin:12px 0 8px;line-height:1.3}
.sec-head p{color:var(--muted);font-size:16px}

/* category block */
.cat{margin-bottom:14px;scroll-margin-top:84px}
.cat-title{display:flex;align-items:center;gap:12px;margin:30px 0 18px}
.cat-title h3{font-size:21px;font-weight:800}
.cat-title .count{font-size:13px;color:var(--muted);background:var(--surface-2);border:1px solid var(--line);padding:3px 10px;border-radius:999px}

/* hub layout: sticky left category nav */
.kb-layout{display:grid;grid-template-columns:236px 1fr;gap:40px;align-items:start}
.kb-nav{position:sticky;top:84px;align-self:start}
.kb-nav-inner{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:14px 14px;box-shadow:var(--shadow)}
.kb-nav-title{font-size:12px;font-weight:800;letter-spacing:.5px;color:var(--muted);padding:4px 10px 10px}
.kb-nav ul{list-style:none;display:flex;flex-direction:column;gap:2px}
.kb-nav li a{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:9px 12px;border-radius:11px;font-size:14.5px;font-weight:600;color:var(--text);transition:background .18s,color .18s}
.kb-nav li a:hover{background:var(--primary-soft);color:var(--primary)}
.kb-nav li a.active{background:var(--primary);color:#fff;box-shadow:0 6px 14px rgba(79,70,229,.28)}
.kb-nav li .n{font-size:12px;min-width:22px;height:22px;border-radius:999px;background:var(--surface-2);display:grid;place-items:center;color:var(--muted);font-weight:700;flex:none}
.kb-nav li a.active .n{background:rgba(255,255,255,.22);color:#fff}
.kb-main{min-width:0}

/* article cards */
.posts{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}
.post{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow);transition:transform .18s,box-shadow .2s;display:flex;flex-direction:column}
.post:hover{transform:translateY(-4px);box-shadow:var(--shadow-lg)}
.post .thumb{height:128px;display:grid;place-items:center;overflow:hidden}
.post .thumb svg{width:100%;height:100%;display:block}
.post .body{padding:18px 20px 22px;display:flex;flex-direction:column;flex:1}
.post .meta{font-size:12px;color:var(--muted);margin-bottom:8px;display:flex;gap:8px;align-items:center}
.post h4{font-size:17px;font-weight:750;margin-bottom:8px;line-height:1.4}
.post p{font-size:14px;color:var(--muted);flex:1}
.post .more{margin-top:14px;font-weight:700;font-size:14px;color:var(--primary)}

/* article page */
.article{max-width:820px;margin:0 auto;padding:30px 22px 10px}
.article .cover{width:100%;height:240px;border-radius:20px;overflow:hidden;margin:18px 0 26px;box-shadow:var(--shadow)}
.article .cover svg{width:100%;height:100%;display:block}
.article h1{font-size:32px;line-height:1.3;font-weight:850;letter-spacing:-.4px;margin:6px 0 12px}
.article .byline{display:flex;align-items:center;gap:12px;color:var(--muted);font-size:14px;margin-bottom:8px;border-bottom:1px solid var(--line);padding-bottom:18px}
.article .byline .av{width:38px;height:38px;border-radius:50%;background:linear-gradient(135deg,#4f46e5,#10b981);display:grid;place-items:center;color:#fff;font-weight:800;font-size:15px;overflow:hidden;border:2px solid #fff;box-shadow:0 4px 10px rgba(0,0,0,.12)}
.article .byline .av img{width:100%;height:100%;object-fit:cover}
.article .body{font-size:16.5px;color:#2a3040}
.article .body h2{font-size:23px;font-weight:800;margin:34px 0 12px;letter-spacing:-.3px}
.article .body h3{font-size:18px;font-weight:750;margin:24px 0 8px}
.article .body p{margin:12px 0}
.article .body ul,.article .body ol{padding-left:22px;margin:12px 0}
.article .body li{margin:8px 0}
.article .body ol li::marker{color:var(--primary);font-weight:800}
.article .body strong{color:var(--text)}
.callout{background:var(--accent-soft);border:1px solid #bfe9d8;border-radius:14px;padding:14px 18px;margin:18px 0;font-size:14.5px;color:#0c6b4f;display:flex;gap:10px}
.callout b{color:#0a5a42}
.tip{background:var(--warm-soft);border:1px solid #f6dca6;border-radius:14px;padding:14px 18px;margin:18px 0;font-size:14.5px;color:#8a5a00}
.tip b{color:#7a4f00}
.kbd{display:inline-block;background:var(--surface-2);border:1px solid var(--line);border-bottom-width:2px;border-radius:7px;padding:1px 8px;font-size:13px;font-weight:700;color:var(--text)}
.diagram{background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:18px;margin:20px 0;box-shadow:var(--shadow)}
.diagram svg{width:100%;height:auto;display:block}

/* related / pager */
.related{margin-top:40px;border-top:1px solid var(--line);padding-top:26px}
.related h3{font-size:18px;font-weight:800;margin-bottom:14px}
.related-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.rel{display:flex;gap:12px;align-items:center;background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:14px 16px;transition:border-color .2s,transform .15s}
.rel:hover{border-color:var(--primary);transform:translateY(-2px)}
.rel .e{font-size:24px;width:44px;height:44px;border-radius:12px;background:var(--primary-soft);display:grid;place-items:center;flex:none}
.rel .t{font-weight:700;font-size:14.5px}
.rel .c{font-size:12.5px;color:var(--muted)}

.source-note{margin-top:30px;background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:18px 20px;font-size:14px;color:var(--muted)}
.source-note a{color:var(--primary);font-weight:700}

/* screenshot figure */
.shot{margin:22px 0;border:1px solid var(--line);border-radius:16px;overflow:hidden;background:var(--surface-2);box-shadow:var(--shadow)}
.shot img{width:100%;height:auto;display:block}
.shot figcaption{font-size:13px;color:var(--muted);padding:10px 14px;text-align:center;background:var(--surface-2);border-top:1px solid var(--line)}
.shot figcaption b{color:var(--primary)}

.cta-block{margin-top:34px;background:linear-gradient(135deg,#4f46e5,#22c7a9);border-radius:22px;padding:32px;color:#fff;display:flex;align-items:center;justify-content:space-between;gap:24px;flex-wrap:wrap;box-shadow:var(--shadow-lg)}
.cta-block .info h3{font-size:21px;font-weight:850;margin-bottom:6px}
.cta-block .info p{opacity:.92;font-size:14.5px}
.cta-block a{background:#fff;color:var(--primary);padding:15px 24px;border-radius:14px;font-weight:900;font-size:15px;display:inline-flex;align-items:center;gap:10px;transition:transform .15s;white-space:nowrap}
.cta-block a:hover{transform:translateY(-2px)}

footer{background:var(--text);color:#aeb4c6;padding:40px 0 30px;margin-top:30px}
.foot-grid{display:flex;justify-content:space-between;flex-wrap:wrap;gap:20px;align-items:center}
footer .brand{color:#fff}
footer .brand small{color:#8b93a8}
footer .links{display:flex;gap:20px;font-size:14px;flex-wrap:wrap}
footer .links a:hover{color:#fff}
footer .copy{width:100%;border-top:1px solid #2c3242;margin-top:24px;padding-top:18px;font-size:12.5px;color:#7c8499}
footer .copy a{color:#aeb4c6}

.btt{position:fixed;right:22px;bottom:22px;width:48px;height:48px;border-radius:50%;background:var(--primary);color:#fff;display:grid;place-items:center;border:none;cursor:pointer;box-shadow:0 10px 24px rgba(79,70,229,.4);opacity:0;pointer-events:none;transform:translateY(8px);transition:opacity .25s,transform .25s,background .2s;z-index:60}
.btt.show{opacity:1;pointer-events:auto;transform:translateY(0)}
.btt:hover{background:#3c34d8}
.btt svg{width:22px;height:22px;fill:none;stroke:#fff;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}

@media(max-width:860px){
  .posts{grid-template-columns:1fr 1fr}
  .hero h1{font-size:30px}
  .nav-links{display:none}
  .menu-btn{display:block}
  .nav-links.open{display:flex;flex-direction:column;width:100%;gap:14px;margin-top:6px;padding-top:12px;border-top:1px solid var(--line)}
  .related-grid{grid-template-columns:1fr}
  .kb-layout{grid-template-columns:1fr;gap:18px}
  .kb-nav{position:sticky;top:64px;z-index:40}
  .kb-nav-inner{padding:10px 12px;display:flex;align-items:center;gap:10px;overflow-x:auto}
  .kb-nav-title{display:none}
  .kb-nav ul{flex-direction:row;gap:8px;flex-wrap:nowrap}
  .kb-nav li a{padding:7px 13px;white-space:nowrap;border:1px solid var(--line);background:var(--surface-2)}
  .kb-nav li .n{display:none}
}
@media(max-width:560px){
  .posts{grid-template-columns:1fr}
  .article h1{font-size:26px}
  .nav-cta{display:none}
}
