/* Layout */
.layout { display: flex; min-height: 100vh; }
.sidebar { width: 240px; position: fixed; top: 0; left: 0; bottom: 0; background: #f8fafc; border-right: 1px solid #e2e8f0; overflow-y: auto; padding: 24px 16px; z-index: 10; }
.content { margin-left: 240px; padding: 40px 48px; max-width: 860px; width: 100%; }

/* Sidebar */
.sidebar-logo { font-size: 20px; font-weight: 700; color: #0f172a; display: block; margin-bottom: 20px; }
.sidebar-search { margin-bottom: 16px; position: relative; }
.sidebar-search input { width: 100%; padding: 8px 12px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 14px; outline: none; }
.sidebar-search input:focus { border-color: #2563eb; }
#search-results { position: absolute; top: 100%; left: 0; right: 0; background: #fff; border: 1px solid #e2e8f0; border-radius: 6px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); max-height: 300px; overflow-y: auto; display: none; z-index: 100; }
#search-results.active { display: block; }
.search-result-item { padding: 8px 12px; border-bottom: 1px solid #f1f5f9; }
.search-result-item:hover { background: #f8fafc; }
.search-result-item a { font-size: 14px; }

/* Nav */
.nav-group { margin-bottom: 4px; }
.nav-toggle { width: 100%; text-align: left; padding: 8px 12px; background: none; border: none; font-size: 14px; font-weight: 600; color: #334155; cursor: pointer; border-radius: 6px; }
.nav-toggle:hover { background: #e2e8f0; }
.nav-sublist { list-style: none; padding-left: 20px; }
.nav-sublist li { margin: 2px 0; }
.nav-sublist a { display: block; padding: 4px 12px; font-size: 13px; color: #64748b; border-radius: 4px; }
.nav-sublist a:hover, .nav-sublist a.active { color: #2563eb; background: #eff6ff; }

/* Article Cards */
.article-list { display: flex; flex-direction: column; gap: 24px; }
.card { border: 1px solid #e2e8f0; border-radius: 12px; overflow: hidden; transition: box-shadow 0.2s; }
.card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.card-cover img { width: 100%; height: 200px; object-fit: cover; }
.card-body { padding: 20px 24px; }
.card-title { font-size: 20px; margin-bottom: 8px; }
.card-summary { font-size: 14px; color: #64748b; margin-bottom: 12px; }
.card-meta { font-size: 13px; color: #94a3b8; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* Article Detail */
.article-cover { margin: 0 0 32px; }
.article-cover img { width: 100%; max-height: 60vh; object-fit: contain; background: #f8fafc; }
.article-header { margin-bottom: 32px; }
.article-header h1 { font-size: 32px; margin-bottom: 12px; }
.article-meta { display: flex; gap: 16px; align-items: center; color: #64748b; font-size: 14px; flex-wrap: wrap; }
.article-toc { background: #f8fafc; padding: 16px 24px; border-radius: 8px; margin-bottom: 32px; }
.article-toc h2 { font-size: 16px; margin-bottom: 8px; }
.article-toc ul { padding-left: 20px; }
.article-toc li { margin: 4px 0; font-size: 14px; }
.article-body { font-size: 16px; line-height: 1.8; }
.article-body h2 { font-size: 24px; margin: 40px 0 16px; }
.article-body h3 { font-size: 20px; margin: 32px 0 12px; }
.article-body p { margin-bottom: 16px; }
.article-body ul, .article-body ol { padding-left: 24px; margin-bottom: 16px; }
.article-body li { margin-bottom: 4px; }
.article-body blockquote { border-left: 4px solid #2563eb; padding: 8px 16px; margin: 16px 0; background: #f8fafc; border-radius: 0 8px 8px 0; }
.article-body pre { background: #1e293b; color: #e2e8f0; padding: 16px 24px; border-radius: 8px; margin: 16px 0; }
.article-body :not(pre) > code { background: #f1f5f9; padding: 2px 6px; border-radius: 4px; }

/* Tags */
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { display: inline-block; padding: 2px 10px; background: #eff6ff; color: #2563eb; border-radius: 12px; font-size: 12px; }
.tag-plain { background: #f1f5f9; color: #64748b; cursor: default; }

/* Breadcrumb */
.breadcrumb { font-size: 14px; color: #94a3b8; margin-bottom: 24px; }
.breadcrumb a { color: #64748b; }
.breadcrumb .sep { margin: 0 8px; }
.breadcrumb .current { color: #0f172a; }

/* Prev/Next */
.prev-next { display: flex; justify-content: space-between; margin-top: 48px; padding-top: 24px; border-top: 1px solid #e2e8f0; }
.prev-next a { font-size: 14px; max-width: 45%; }

/* Hero */
.hero { margin-bottom: 40px; }
.hero h1 { font-size: 36px; margin-bottom: 8px; }
.hero p { font-size: 18px; color: #64748b; }
.page-title { font-size: 28px; margin-bottom: 24px; }
.page-title .count { color: #94a3b8; font-weight: 400; }
