*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: #f5f5f5; color: #222; line-height: 1.6; }
.container { max-width: 640px; margin: 0 auto; padding: 20px 16px; }
a { color: #4a90d9; text-decoration: none; }
a:hover { text-decoration: underline; }

header { text-align: center; padding: 32px 0 24px; }
header h1 { font-size: 24px; font-weight: 700; color: #1a1a1a; }
header p { font-size: 14px; color: #888; margin-top: 4px; }
nav { padding: 8px 0 16px; }
nav a { font-size: 14px; }

.index-hero { text-align: center; padding: 40px 0; }
.index-hero h2 { font-size: 20px; font-weight: 700; color: #1a1a1a; }
.index-hero .subtitle { font-size: 14px; color: #888; margin-top: 8px; }

.categories { display: flex; flex-direction: column; gap: 12px; margin-bottom: 32px; }
.cat-card { display: block; background: #fff; border-radius: 10px; padding: 20px 18px; box-shadow: 0 1px 3px rgba(0,0,0,.06); transition: box-shadow .15s; text-decoration: none; color: #222; }
.cat-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.1); text-decoration: none; }
.cat-card .cat-icon { font-size: 24px; margin-bottom: 8px; }
.cat-card .cat-name { font-size: 17px; font-weight: 600; }
.cat-card .cat-count { font-size: 13px; color: #888; margin-top: 4px; }

.stats { text-align: center; padding: 16px 0; border-top: 1px solid #eee; }
.stats span { font-size: 13px; color: #888; }
.stats span + span { margin-left: 16px; }

.browse-header a { font-size: 14px; }
.browse-header h1 { font-size: 20px; }
.browse-header p { font-size: 13px; }

#search { margin-bottom: 20px; }

.doc-list { display: flex; flex-direction: column; gap: 10px; }
.doc-card { display: block; background: #fff; border-radius: 8px; padding: 16px 18px; box-shadow: 0 1px 3px rgba(0,0,0,.04); text-decoration: none; color: #222; transition: box-shadow .12s; border-left: 3px solid #4a90d9; }
.doc-card:hover { box-shadow: 0 2px 6px rgba(0,0,0,.08); text-decoration: none; }
.doc-card .doc-title { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.doc-card .doc-preview { font-size: 13px; color: #999; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.doc-card .doc-info { font-size: 11px; color: #bbb; margin-top: 8px; display: flex; gap: 12px; align-items: center; }

.empty-state { text-align: center; padding: 40px 0; color: #bbb; font-size: 14px; }

.content { background: #fff; border-radius: 8px; padding: 24px 20px; box-shadow: 0 1px 3px rgba(0,0,0,.08); line-height: 1.8; }
.content h1 { font-size: 20px; margin-bottom: 16px; }
.content h2 { font-size: 17px; margin: 20px 0 10px; }
.content h3 { font-size: 15px; margin: 16px 0 8px; }
.content p { margin: 8px 0; }
.content ul, .content ol { margin: 8px 0; padding-left: 24px; }
.content li { margin: 4px 0; }
.content blockquote { border-left: 3px solid #4a90d9; padding: 4px 12px; margin: 12px 0; color: #555; background: #f8f9fa; }
.content code { background: #f0f0f0; padding: 1px 4px; border-radius: 3px; font-size: 90%; }
.content pre { background: #2d2d2d; color: #d4d4d4; padding: 14px 16px; border-radius: 8px; overflow-x: auto; font-size: 88%; margin: 10px 0; line-height: 1.5; }
.content pre code { background: none; padding: 0; color: inherit; font-size: inherit; }

footer { text-align: center; padding: 32px 0; font-size: 12px; color: #bbb; }
footer a { color: #bbb; }

@media (max-width: 640px) {
  .container { padding: 16px 12px; }
  .content { padding: 18px 14px; }
  .cat-card { padding: 16px 14px; }
}
