:root {
    --wiki-green: #0d571b;
    --wiki-green-dark: #083c12;
    --wiki-gold: #d7aa5c;
    --wiki-bg: #f4f6f5;
    --wiki-sidebar-width: 260px;
}

body { background: var(--wiki-bg); color: #24302a; min-height: 100vh; }
.wiki-navbar { background: linear-gradient(110deg, var(--wiki-green-dark), var(--wiki-green)); min-height: 68px; }
.brand-mark { width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 10px; background: rgba(255,255,255,.13); color: var(--wiki-gold); }
.search-global { max-width: 720px; margin: auto; }
.search-global .input-group-text, .search-global .form-control { background: rgba(255,255,255,.96); }
.search-global .input-group-text { color: #657269; border-radius: 12px 0 0 12px; }
.search-global .form-control { border-radius: 0 12px 12px 0; box-shadow: none; }

.wiki-sidebar { background: #fff; border-right: 1px solid #e4e9e6; }
.wiki-sidebar .nav-link { color: #4a574f; border-radius: 10px; padding: .65rem .8rem; }
.wiki-sidebar .nav-link:hover { background: #eef5ef; color: var(--wiki-green); }
.wiki-sidebar .nav-link.active { color: #fff; background: var(--wiki-green); }
.sidebar-label { color: #8a958e; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin: 0 .75rem .4rem; }

@media (min-width: 992px) {
    .wiki-sidebar { position: fixed; top: 68px; bottom: 0; left: 0; width: var(--wiki-sidebar-width); overflow-y: auto; }
    .wiki-main { margin-left: var(--wiki-sidebar-width); }
}

.wiki-main { min-height: calc(100vh - 68px); }
.content-width { max-width: 1080px; margin-inline: auto; }
.card { border: 0; border-radius: 16px; box-shadow: 0 5px 22px rgba(30,55,40,.06); }
.category-card { height: 100%; transition: transform .18s ease, box-shadow .18s ease; text-decoration: none; color: inherit; }
.category-card:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(30,55,40,.11); color: inherit; }
.category-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 13px; color: var(--wiki-green); background: #e9f4eb; font-size: 1.3rem; }
.hero-search { background: linear-gradient(125deg, var(--wiki-green-dark), var(--wiki-green)); border-radius: 22px; color: #fff; overflow: hidden; }
.hero-search .form-control, .hero-search .input-group-text { border: 0; background: #fff; }
.hero-search .input-group-text { border-radius: 13px 0 0 13px; }
.hero-search .form-control { min-height: 54px; border-radius: 0 13px 13px 0; box-shadow: none; }
.article-list-item { transition: background .15s ease; }
.article-list-item:hover { background: #f7faf8; }
.article-summary { color: #69756e; }

.wiki-article { max-width: 920px; }
.wiki-article-body { font-size: 1.05rem; line-height: 1.75; }
.wiki-article-body h2, .wiki-article-body h3, .wiki-article-body h4 { color: #1f3026; scroll-margin-top: 92px; margin-top: 2rem; margin-bottom: .8rem; }
.wiki-article-body img { display: block; max-width: 100%; height: auto; border-radius: 12px; margin: 1.25rem auto; box-shadow: 0 5px 20px rgba(0,0,0,.09); }
.wiki-article-body table { width: 100%; margin-bottom: 1rem; border-collapse: collapse; }
.wiki-article-body th, .wiki-article-body td { border: 1px solid #dfe5e1; padding: .65rem; }
.wiki-article-body blockquote { border-left: 4px solid var(--wiki-gold); background: #fff9ef; padding: 1rem 1.2rem; border-radius: 0 10px 10px 0; }
.wiki-article-body pre { background: #17221b; color: #e6efe8; padding: 1rem; border-radius: 12px; overflow-x: auto; }
.article-find { padding: 1rem; border: 1px solid #dfe7e1; border-radius: 14px; background: #f7faf8; }
.article-find .input-group-text { color: #68766d; background: #fff; }
.article-find .form-control { min-width: 8rem; box-shadow: none; }
.article-find-status { min-height: 1.25rem; }
.article-search-hit { padding: .05em .14em; border-radius: .22em; color: inherit; background: #ffe69c; box-shadow: 0 0 0 1px rgba(120, 82, 0, .12); scroll-margin-top: 100px; }
.article-search-hit-current { background: var(--wiki-gold); outline: 2px solid var(--wiki-green); outline-offset: 2px; }
.article-meta { color: #738078; font-size: .9rem; }
.video-frame { width: 100%; aspect-ratio: 16/9; border: 0; border-radius: 14px; background: #111; }
.media-thumb { border: 1px solid #e2e8e4; border-radius: 12px; overflow: hidden; background: #fff; }
.media-thumb img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }

.status-badge { font-weight: 600; }
.status-draft { background: #fff3cd; color: #664d03; }
.status-review { background: #cff4fc; color: #055160; }
.status-published { background: #d1e7dd; color: #0f5132; }
.status-archived { background: #e2e3e5; color: #41464b; }

.ql-toolbar.ql-snow { border-radius: 12px 12px 0 0; border-color: #d7ded9; background: #f8faf9; }
.ql-container.ql-snow { border-radius: 0 0 12px 12px; border-color: #d7ded9; background: #fff; min-height: 440px; font-size: 1rem; }
.ql-editor { min-height: 440px; line-height: 1.65; }
.form-control, .form-select { border-color: #d7ded9; border-radius: 10px; }
.form-control:focus, .form-select:focus { border-color: #6e9b76; box-shadow: 0 0 0 .2rem rgba(13,87,27,.12); }
.btn-primary { --bs-btn-bg: var(--wiki-green); --bs-btn-border-color: var(--wiki-green); --bs-btn-hover-bg: var(--wiki-green-dark); --bs-btn-hover-border-color: var(--wiki-green-dark); }
.btn-outline-primary { --bs-btn-color: var(--wiki-green); --bs-btn-border-color: var(--wiki-green); --bs-btn-hover-bg: var(--wiki-green); --bs-btn-hover-border-color: var(--wiki-green); }

.auth-body { background: radial-gradient(circle at 20% 10%, #347340 0, var(--wiki-green-dark) 45%, #061f0c 100%); display: grid; place-items: center; }
.auth-card { max-width: 460px; margin: 5vh auto; border-radius: 22px; }
.auth-logo { width: 68px; height: 68px; margin: 0 auto 1rem; display: grid; place-items: center; border-radius: 18px; background: #eaf4eb; color: var(--wiki-green); font-size: 2rem; }
.auth-alert { max-width: 460px; }

@media print {
    .wiki-navbar, .wiki-sidebar, .no-print, .feedback-box { display: none !important; }
    .wiki-main { margin: 0; }
    body { background: #fff; }
    .card { box-shadow: none; }
    .article-search-hit { padding: 0; background: transparent !important; box-shadow: none; outline: 0; }
}
