@font-face { font-family: 'Telegraf'; src: url('/fonts/PPTelegraf-Regular.ttf') format('truetype'); font-weight: 400; }
@font-face { font-family: 'Telegraf'; src: url('/fonts/PPTelegraf-Bold.ttf') format('truetype'); font-weight: 700; }
@font-face { font-family: 'Inter'; src: url('/fonts/Inter_18pt-Regular.ttf') format('truetype'); font-weight: 400; }
@font-face { font-family: 'Inter'; src: url('/fonts/Inter_18pt-SemiBold.ttf') format('truetype'); font-weight: 600; }

:root {
  --cobalt: #050E3D; --cobalt-light: #0A1A5C; --cobalt-muted: #1A2A6C;
  --coral: #FF557E; --coral-soft: #FF7A9A;
  --seaglass: #BFDDDB; --seaglass-light: #E0F0EF;
  --cream: #F8F6F2; --white: #FFFFFF;
  --text: #1A1A2E; --text-muted: #6B7280; --border: #E5E7EB;
  --font-display: 'Telegraf', -apple-system, sans-serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --sidebar-width: 280px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-body); background: var(--cream); color: var(--text); display: flex; min-height: 100vh; }

.sidebar { width: var(--sidebar-width); background: var(--cobalt); color: var(--white); position: fixed; top: 0; left: 0; height: 100vh; display: flex; flex-direction: column; overflow-y: auto; z-index: 100; }
.sidebar__brand { display: flex; flex-direction: column; align-items: center; padding: 24px 20px 16px; text-decoration: none; color: var(--white); border-bottom: 1px solid rgba(255,255,255,0.1); }
.sidebar__logo { height: 32px; margin-bottom: 8px; opacity: 0.9; }
.sidebar__title { font-family: var(--font-display); font-size: 20px; font-weight: 700; letter-spacing: 3px; color: var(--coral); }
.sidebar__sub { font-size: 11px; opacity: 0.6; margin-top: 2px; letter-spacing: 0.5px; }
.sidebar__search { padding: 16px; position: relative; }
.sidebar__search input { width: 100%; padding: 8px 12px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.15); background: rgba(255,255,255,0.08); color: var(--white); font-family: var(--font-body); font-size: 13px; outline: none; transition: border-color 0.2s; }
.sidebar__search input::placeholder { color: rgba(255,255,255,0.4); }
.sidebar__search input:focus { border-color: var(--coral); background: rgba(255,255,255,0.12); }
.search-results { position: absolute; top: 100%; left: 16px; right: 16px; background: var(--white); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.2); display: none; max-height: 300px; overflow-y: auto; z-index: 200; }
.search-results.active { display: block; }
.search-result { display: block; padding: 10px 14px; text-decoration: none; color: var(--text); border-bottom: 1px solid var(--border); transition: background 0.15s; }
.search-result:hover { background: var(--seaglass-light); }
.search-result:last-child { border-bottom: none; }
.search-result__title { font-weight: 600; font-size: 13px; }
.search-result__cat { font-size: 11px; color: var(--text-muted); }
.sidebar__nav { flex: 1; padding: 8px 0; overflow-y: auto; }
.nav-group { margin-bottom: 8px; }
.nav-group__label { padding: 8px 20px 4px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; opacity: 0.5; }
.nav-link { display: block; padding: 6px 20px 6px 28px; font-size: 13px; color: rgba(255,255,255,0.75); text-decoration: none; transition: all 0.15s; border-left: 3px solid transparent; }
.nav-link:hover { color: var(--white); background: rgba(255,255,255,0.06); }
.nav-link--active { color: var(--coral-soft); border-left-color: var(--coral); background: rgba(255,85,126,0.08); }
.sidebar__footer { padding: 12px 20px; border-top: 1px solid rgba(255,255,255,0.1); display: flex; flex-direction: column; gap: 2px; }
.sidebar__meta { font-size: 10px; opacity: 0.4; }

.content { margin-left: var(--sidebar-width); flex: 1; min-height: 100vh; }
.article { max-width: 780px; margin: 0 auto; padding: 48px 40px; }
.article__header { margin-bottom: 32px; padding-bottom: 24px; border-bottom: 2px solid var(--seaglass); }
.article__category { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.5px; color: var(--coral); margin-bottom: 8px; }
.article__title { font-family: var(--font-display); font-size: 32px; font-weight: 700; color: var(--cobalt); line-height: 1.2; margin-bottom: 12px; }
.article__meta { display: flex; gap: 16px; flex-wrap: wrap; }
.meta-item { font-size: 12px; color: var(--text-muted); background: var(--white); padding: 3px 10px; border-radius: 100px; border: 1px solid var(--border); }
.meta-item--internal { background: var(--cobalt); color: var(--white); border-color: var(--cobalt); }
.article__tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.tag { font-size: 11px; background: var(--seaglass-light); color: var(--cobalt); padding: 2px 10px; border-radius: 100px; }

.article__body h2 { font-family: var(--font-display); font-size: 22px; color: var(--cobalt); margin: 36px 0 14px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.article__body h3 { font-family: var(--font-display); font-size: 17px; color: var(--cobalt-light); margin: 28px 0 10px; }
.article__body p { font-size: 15px; line-height: 1.7; margin-bottom: 14px; }
.article__body ul, .article__body ol { padding-left: 24px; margin-bottom: 14px; }
.article__body li { font-size: 15px; line-height: 1.7; margin-bottom: 6px; }
.article__body strong { color: var(--cobalt); }
.article__body blockquote { border-left: 4px solid var(--coral); background: var(--white); padding: 14px 20px; margin: 18px 0; border-radius: 0 8px 8px 0; font-style: italic; }
.article__body code { font-size: 13px; background: var(--white); padding: 2px 6px; border-radius: 4px; border: 1px solid var(--border); }
.article__body pre { background: var(--cobalt); color: var(--seaglass); padding: 18px; border-radius: 8px; overflow-x: auto; margin: 18px 0; }
.article__body pre code { background: none; border: none; padding: 0; color: inherit; }
.wikilink { color: var(--coral); text-decoration: none; border-bottom: 1px solid rgba(255,85,126,0.3); transition: border-color 0.15s; }
.wikilink:hover { border-bottom-color: var(--coral); }
.wikilink--missing { color: var(--text-muted); border-bottom: 1px dashed var(--text-muted); }

.index-hero { text-align: center; padding: 64px 40px 40px; }
.index-hero__title { font-family: var(--font-display); font-size: 48px; font-weight: 700; color: var(--cobalt); letter-spacing: 4px; }
.index-hero__sub { font-size: 16px; color: var(--text-muted); margin-top: 8px; }
.index-grid { max-width: 880px; margin: 0 auto; padding: 0 40px 64px; }
.index-category { margin-bottom: 36px; }
.index-category__title { font-family: var(--font-display); font-size: 20px; color: var(--cobalt); margin-bottom: 4px; }
.index-category__desc { font-size: 13px; color: var(--text-muted); margin-bottom: 14px; }
.index-category__pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.index-card { display: flex; flex-direction: column; padding: 14px 18px; background: var(--white); border-radius: 8px; border: 1px solid var(--border); text-decoration: none; color: var(--text); transition: all 0.2s; }
.index-card:hover { border-color: var(--coral); box-shadow: 0 2px 8px rgba(255,85,126,0.1); transform: translateY(-1px); }
.index-card__title { font-weight: 600; font-size: 14px; color: var(--cobalt); margin-bottom: 4px; }
.index-card__meta { font-size: 11px; color: var(--text-muted); }

@media (max-width: 768px) { .sidebar { display: none; } .content { margin-left: 0; } .article { padding: 24px 20px; } .article__title { font-size: 24px; } .index-hero__title { font-size: 32px; } }