[hidden]{display:none!important}:root{--gold:#f5ae08;--ink:#252525;--muted:#777;--line:#e8e8e8}*{box-sizing:border-box}body{margin:0;color:var(--ink);font:15px Arial,sans-serif;background:#eef1f5 radial-gradient(ellipse at 50% -10%,#fff 0,#eef1f5 60%)}a{text-decoration:none;color:inherit}.top{height:64px;display:flex;align-items:center;padding:0 28px;background:#fff;box-shadow:0 1px 8px #00000012;gap:48px;position:sticky;top:0;z-index:2}.brand{font-size:25px;font-weight:800;color:#e5a600}.brand span{color:#333;margin-left:4px}.top nav{display:flex;gap:36px;font-weight:700;color:#555;letter-spacing:.02em}.top nav a:hover,.block-head a{color:#e2a500}.locale{margin-left:auto;color:#888;font-size:12px}main{max-width:1280px;margin:28px auto;background:#fff;min-height:calc(100vh - 120px);padding:34px 70px 65px;box-shadow:0 2px 18px #0000000d}.intro{max-width:850px}.intro h1{font-size:38px;margin:0 0 18px}.intro p{font-size:17px;line-height:1.6;color:#666}.search{display:flex;border:2px solid var(--gold);border-radius:8px;height:54px;margin:34px 0 45px}.search input{flex:1;border:0;padding:0 18px;font-size:16px;outline:0}.search button{width:62px;border:0;background:var(--gold);font-size:27px;color:#fff}.block{margin:42px 0}.block-head{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);margin-bottom:18px}.block h2{font-size:24px;margin:0 0 12px}.cards{display:grid;grid-template-columns:repeat(5,1fr);gap:12px}.update-card{min-height:145px;padding:18px;border-radius:8px;background:linear-gradient(145deg,#345a78,#123047);color:white;box-shadow:0 5px 12px #0002}.article-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.article-card{border:1px solid var(--line);border-radius:8px;padding:23px;min-height:205px}.article-card h3{font-size:19px;margin:12px 0}.article-card p{color:#666;line-height:1.45}.data-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}.data-card{border:1px solid var(--line);border-radius:8px;padding:20px;display:flex;flex-direction:column;gap:8px}.empty-block{padding-bottom:15px;color:#666}footer{text-align:center;color:#999;padding:20px;font-size:12px}.forum-header{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;border-bottom:1px solid var(--line);padding-bottom:18px}.forum-user{color:#666;font-size:13px;display:flex;gap:10px;align-items:center}.forum-user button{padding:7px 12px;background:#fff;border:1px solid #d8dce2;color:#805c16;border-radius:6px}.forum-categories{margin:20px 0}.forum-category-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:12px 0 25px}.forum-category{display:block;padding:16px;border:1px solid #e8d29e;border-radius:8px;background:linear-gradient(145deg,#fffdf6,#fff8e7);box-shadow:0 2px 8px #00000008}.forum-category b{color:#7e5810}.forum-category small{display:block;color:#888;font-size:12px;margin-top:7px}.auth-state{margin:0;color:#666}.auth-state.ok{color:#2d7a45}.auth-state.guest{color:#8a5b00}.forum-action{display:inline-block;color:#a66b00;font-weight:700;text-decoration:underline}#new-topic{display:grid;gap:10px;max-width:760px;margin:24px 0}#new-topic input,#new-topic textarea{width:100%;padding:10px;border:1px solid #d8dce2;border-radius:6px;font:inherit}#new-topic textarea{min-height:120px;resize:vertical}#new-topic button[disabled]{opacity:.55;cursor:not-allowed}@media(max-width:800px){main{margin:0;padding:25px 18px}.cards{grid-template-columns:repeat(2,1fr)}.article-grid,.data-grid{grid-template-columns:1fr 1fr}}@media(max-width:650px){.forum-header{display:block}.forum-user{margin-top:12px}.forum-category-grid{grid-template-columns:1fr}}@media(max-width:480px){.cards,.article-grid,.data-grid{grid-template-columns:1fr}}
.forum-category-grid .forum-category{min-height:92px;transition:transform .15s,box-shadow .15s}.forum-category-grid .forum-category:hover{transform:translateY(-2px);box-shadow:0 5px 15px #c98b2526}.forum-category-grid .forum-category small+small{color:#9a7a42;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.forum-user{background:#fffaf0;border:1px solid #f0d99c;border-radius:20px;padding:7px 12px}
#topics{display:grid;gap:12px;max-width:920px;margin-top:24px}.forum-topic-card{min-height:0;padding:20px}.forum-topic-card h3{margin:8px 0;font-size:19px}.forum-topic-card h3 a{color:#76520d}.forum-topic-card p{margin:0 0 10px}.topic-meta{display:flex;justify-content:space-between;gap:12px;color:#a2741b;font-size:12px;font-weight:700}.topic-meta time{color:#999;font-weight:400}
.editor-toolbar{display:flex;gap:6px}.editor-toolbar button{padding:6px 10px;border:1px solid #d8dce2;background:#fff;border-radius:5px;cursor:pointer}.editor{min-height:180px;padding:12px;border:1px solid #d8dce2;border-radius:6px;background:#fff;line-height:1.5}.editor:empty:before{content:attr(data-placeholder);color:#999}.editor blockquote{border-left:3px solid var(--gold);padding-left:12px;color:#666}
.editor-actions{display:flex;gap:8px;flex-wrap:wrap}.editor-actions button{padding:8px 12px;border:1px solid #d8dce2;background:#fff;border-radius:6px;cursor:pointer}.editor-actions button#new-submit{background:var(--gold);color:#fff;border-color:var(--gold)}
.forum-create-button{display:block;margin:18px 0 12px;padding:12px 18px;border:1px solid #d49300;border-radius:7px;background:#f5ae08;color:#fff;font-weight:700;cursor:pointer}.forum-category-grid{display:flex;flex-direction:column;gap:8px}.forum-category{display:grid;grid-template-columns:minmax(220px,1fr) 2fr;align-items:center;min-height:70px}.forum-category small{margin-top:0}.forum-category small+small{margin-top:4px}.forum-categories{position:relative}.forum-categories .forum-create-button{position:absolute;right:0;top:0;margin:0}.forum-categories h2{margin:0;padding-right:240px}@media(max-width:650px){.forum-categories .forum-create-button{position:static;margin:10px 0}.forum-categories h2{padding-right:0}}.forum-categories .forum-create-button{position:static;float:right;display:inline-flex;align-items:center;height:40px;margin:-4px 0 8px}.forum-categories h2{display:inline-block;line-height:40px;margin:0;padding-right:0}.forum-categories:after{content:"";display:block;clear:both}.forum-user-avatar,.profile-avatar{width:42px;height:42px;border-radius:50%;object-fit:cover}.profile-avatar{display:block;margin:12px 0}.user-menu-button{border:0;background:none;font:inherit;font-weight:700;color:#333;cursor:pointer}.user-menu{position:absolute;right:0;top:44px;z-index:10;min-width:190px;background:#fff;border:1px solid #ddd;border-radius:8px;box-shadow:0 8px 22px #0002;padding:8px}.forum-user{position:relative}.user-menu a,.user-menu button{display:block;width:100%;padding:9px;text-align:left;border:0;background:#fff;color:#333;cursor:pointer}.user-menu a:hover,.user-menu button:hover{background:#fff7df}.breadcrumbs{display:flex;gap:10px;align-items:center;color:#777;margin-bottom:24px}.breadcrumbs a{color:#8a610f;text-decoration:none}.breadcrumbs a:hover{text-decoration:underline}.breadcrumbs span{color:#aaa}.user-menu-button{display:inline-flex;align-items:center;gap:7px}.forum-card-avatar{width:24px;height:24px;vertical-align:middle;margin-right:6px}.forum-latest{display:flex!important;align-items:center;gap:5px}
.editor-footer{display:flex;justify-content:space-between;align-items:center;color:#777;font-size:12px}.editor-fullscreen{position:fixed!important;inset:20px;z-index:20;background:#fff;padding:20px;overflow:auto;box-shadow:0 0 0 9999px #0008}.editor-fullscreen+*{}
.editor-select{padding:6px;border:1px solid #d8dce2;border-radius:5px;background:#fff}
.editor-toolbar{display:flex;flex-wrap:wrap;gap:6px;align-items:center;max-width:100%;overflow:visible}.editor-toolbar button{width:34px;height:32px;padding:0;font-size:0;display:inline-flex;align-items:center;justify-content:center}.editor-toolbar button b,.editor-toolbar button i{font-size:16px}.editor-toolbar button[data-cmd="undo"]:before{content:"↶";font-size:18px}.editor-toolbar button[data-cmd="redo"]:before{content:"↷";font-size:18px}.editor-toolbar button[data-cmd="underline"]:before{content:"U";text-decoration:underline;font-size:15px}.editor-toolbar button[data-cmd="strikeThrough"]:before{content:"S";text-decoration:line-through;font-size:15px}.editor-toolbar button[data-cmd="insertOrderedList"]:before{content:"☷";font-size:18px}.editor-toolbar button[data-cmd="removeFormat"]:before{content:"Tx";font-size:13px}.editor-toolbar button[data-cmd="insertUnorderedList"]:before{content:"•☷";font-size:13px}.editor-toolbar button[data-cmd="formatBlock"][data-value="blockquote"]:before{content:"❝";font-size:18px}.editor-toolbar button[data-cmd="formatBlock"][data-value="h3"]:before{content:"H";font-size:16px;font-weight:bold}.editor-toolbar button[data-template="link"]:before{content:"🔗";font-size:15px}.editor-toolbar button[data-template="spoiler"]:before{content:"▣";font-size:16px}.editor-toolbar button[data-template="video"]:before{content:"▶";font-size:15px}.editor-toolbar button[data-template="image"]:before{content:"▧";font-size:18px}.editor-toolbar button[data-template="table"]:before{content:"▦";font-size:18px}.editor-toolbar button[title]{position:relative}.editor-toolbar button:hover:after{content:attr(title);position:absolute;top:36px;left:0;z-index:30;background:#222;color:#fff;padding:4px 7px;border-radius:4px;font-size:11px;white-space:nowrap}.editor-toolbar .editor-select{height:32px;max-width:120px}
@media(max-width:650px){#new-topic{max-width:100%;padding:14px}.editor-toolbar{gap:4px}.editor-toolbar button{width:30px;height:30px}.editor-toolbar .editor-select{max-width:92px;padding:4px}.editor{min-height:220px;max-width:100%;overflow-wrap:anywhere}}

.editor table{width:100%;border-collapse:collapse;margin:10px 0}.editor th,.editor td{border:1px solid #cfd5dd;padding:7px;min-width:70px}.editor th{background:#f2f4f7;font-weight:700}.editor caption{text-align:left;font-weight:700;margin-bottom:6px}
#create-shell{width:100%}#create-shell #new-topic{width:100%!important;max-width:none!important}#create-shell #new-body-editor{width:100%;min-height:280px}#create-shell .editor-toolbar{width:100%}@media(max-width:650px){#create-shell #new-topic{width:100%!important;padding:14px}}
.editor-toolbar button[data-cmd="justifyLeft"]:before{content:"≡"}.editor-toolbar button[data-cmd="justifyCenter"]:before{content:"☰"}.editor-toolbar button[data-cmd="justifyRight"]:before{content:"≡"}.editor-toolbar button[data-cmd="formatBlock"][data-value="pre"]:before{content:"<>"}.editor-toolbar button[data-cmd="insertHorizontalRule"]:before{content:"―"}
.editor-tabs{display:flex;gap:4px;margin:0 0 10px;border-bottom:1px solid #d8dce2}.editor-tab{border:1px solid #d8dce2;border-bottom:0;background:#f4f6f8;padding:9px 18px;border-radius:6px 6px 0 0;cursor:pointer}.editor-tab.active{background:#fff;font-weight:700}.poll-panel{margin-bottom:10px}.poll-panel textarea{width:100%;min-height:100px;padding:10px}.poll-panel input[type=text]{width:100%;padding:10px}
.publish-options{border:1px solid #e1e5ea;border-radius:7px;padding:14px;display:grid;gap:8px}.publish-options h3{margin:0 0 4px;font-size:16px}.publish-options label{display:flex;align-items:center;gap:7px}.publish-options input[type=datetime-local]{padding:7px;border:1px solid #d8dce2;border-radius:5px}
.editor-toolbar button[data-cmd="justifyLeft"]:before,.editor-toolbar button[data-cmd="justifyCenter"]:before,.editor-toolbar button[data-cmd="justifyRight"]:before,.editor-toolbar button[data-cmd="formatBlock"][data-value="pre"]:before,.editor-toolbar button[data-cmd="insertHorizontalRule"]:before{font-size:17px;line-height:1}.editor-toolbar button[data-cmd="justifyLeft"]:after{content:"По левому краю"}.editor-toolbar button[data-cmd="justifyCenter"]:after{content:"По центру"}.editor-toolbar button[data-cmd="justifyRight"]:after{content:"По правому краю"}.editor-toolbar button[data-cmd="formatBlock"][data-value="pre"]:after{content:"Код"}.editor-toolbar button[data-cmd="insertHorizontalRule"]:after{content:"Разделитель"}
.editor-toolbar button[data-cmd="justifyLeft"]:after,.editor-toolbar button[data-cmd="justifyCenter"]:after,.editor-toolbar button[data-cmd="justifyRight"]:after,.editor-toolbar button[data-cmd="formatBlock"][data-value="pre"]:after,.editor-toolbar button[data-cmd="insertHorizontalRule"]:after{content:none!important}
.editor-toolbar button[data-table-action]{font-size:0}.editor-toolbar button[data-table-action="row-add"]:before{content:"＋";font-size:18px}.editor-toolbar button[data-table-action="row-del"]:before{content:"−";font-size:18px}.editor-toolbar button[data-table-action="col-add"]:before{content:"▥＋";font-size:13px}.editor-toolbar button[data-table-action="col-del"]:before{content:"▥−";font-size:13px}.editor-toolbar button[data-table-action]:after{content:attr(title);position:absolute;top:36px;left:0;z-index:30;background:#222;color:#fff;padding:4px 7px;border-radius:4px;font-size:11px;white-space:nowrap;display:none}.editor-toolbar button[data-table-action]:hover:after{display:block}
.theme-toggle{border:1px solid #d8dce2;background:#fff;border-radius:50%;width:32px;height:32px;cursor:pointer}.theme-dark{--ink:#e8edf3;--muted:#b9c2cc;--line:#394552;background:#17212b;color:var(--ink)}.theme-dark main,.theme-dark .article-card,.theme-dark .forum-category,.theme-dark .user-menu{background:#202c38;color:var(--ink);border-color:#40505e}.theme-dark input,.theme-dark textarea,.theme-dark select{background:#263746;color:#f2f5f7;border-color:#526577}
main label{display:grid;gap:5px;margin:8px 0}main label textarea,main label input{padding:9px;border:1px solid #d8dce2;border-radius:6px;font:inherit}
.profile-topic{padding:.65rem 0;border-bottom:1px solid #e5e7eb}.profile-topic a{font-weight:600}.profile-topic small{display:block;color:#64748b;margin-top:.2rem}.theme-dark .profile-topic{border-color:#334155}
.message-row{padding:.75rem 0;border-bottom:1px solid #e5e7eb}.message-row p{margin:.25rem 0}.message-row small{color:#64748b}
.profile-cover{height:150px;border-radius:10px;background:#dbe3ec center/cover no-repeat;margin:1rem 0;border:1px solid var(--line)}
.preview-item{display:inline-block;padding:.35rem .55rem;border:1px solid var(--line);border-radius:5px;margin:.15rem}

.editor-toolbar{flex-wrap:wrap;align-items:center}.editor-toolbar button:focus-visible,.editor-toolbar select:focus-visible,.editor:focus-visible,button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid #1d78c1;outline-offset:2px}.content-links{padding-left:24px}.section-rules{min-height:0;margin:16px 0;padding:16px}.message-thread{border-top:1px solid var(--line);padding:14px 0}.message-thread:first-child{border-top:0}@media(max-width:650px){.editor-toolbar{max-height:none;overflow:visible}.editor-toolbar button:hover:after{display:none}}


/* Visual polish pass */
:root{--gold:#e7a400;--gold-dark:#b97900;--surface:#fff;--soft:#fffaf0;--shadow:0 10px 28px rgba(40,52,65,.08)}body{font-family:Inter,Segoe UI,Arial,sans-serif;background:linear-gradient(180deg,#f4f7fa 0%,#e9eef3 100%);color:#17202a}main{max-width:1320px;margin:24px auto;padding:38px 56px 70px;border:1px solid #e3e8ee;border-radius:14px;box-shadow:var(--shadow)}.forum-header{padding-bottom:24px;margin-bottom:26px;border-bottom:0}.forum-header h1,.forum-categories h2{font-size:30px;letter-spacing:-.02em;color:#111827}.forum-categories{background:transparent}.forum-create-button{background:linear-gradient(135deg,#f6b719,#e39a00);border:0;border-radius:8px;box-shadow:0 4px 10px rgba(216,147,0,.22);transition:transform .16s,box-shadow .16s}.forum-create-button:hover{transform:translateY(-1px);box-shadow:0 7px 16px rgba(216,147,0,.28)}.forum-category{background:var(--surface);border:1px solid #e1e7ee;border-radius:10px;box-shadow:0 3px 10px rgba(30,45,60,.04);padding:20px 22px;transition:border-color .16s,box-shadow .16s,transform .16s}.forum-category:hover{transform:translateY(-2px);border-color:#edc466;box-shadow:0 9px 20px rgba(30,45,60,.09)}.forum-category b{font-size:17px;color:#1f2937}.forum-category small{color:#64748b}.forum-category small+small{color:#9a6a12}.forum-topic-card,.article-card{background:var(--surface);border-color:#e1e7ee;border-radius:10px;box-shadow:0 3px 10px rgba(30,45,60,.035)}.topic-meta{color:#a46b08}.topic-meta time{color:#8491a0}.forum-action{color:var(--gold-dark);text-decoration:none;border-bottom:1px solid #eac36b}.editor-toolbar{background:#f7f9fb;border:1px solid #e1e7ee;border-radius:9px;padding:8px}.editor{border-color:#cfd8e2;border-radius:0 0 9px 9px;box-shadow:inset 0 1px 3px rgba(30,45,60,.03)}.editor-actions button{border-radius:8px}.editor-actions button#new-submit{background:linear-gradient(135deg,#f6b719,#e39a00);box-shadow:0 4px 10px rgba(216,147,0,.2)}@media(max-width:800px){main{margin:0;border-radius:0;padding:26px 20px 50px}.forum-header h1,.forum-categories h2{font-size:25px}.forum-category{padding:16px}}

.search-filters{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.search-filters input,.search-filters select,.search-filters button{min-height:38px;padding:8px 10px;border:1px solid #d5dde6;border-radius:7px;background:#fff;font:inherit}.search-filters button{cursor:pointer;color:#6f4d0b;background:#fffaf0}.search-filters button:hover{background:#fff0c9}

#toast-root{position:fixed;right:22px;bottom:22px;z-index:100;display:grid;gap:10px;max-width:min(360px,calc(100vw - 32px))}.toast{display:flex;align-items:center;gap:12px;padding:12px 14px;border:1px solid #d9e1e8;border-radius:9px;background:#fff;box-shadow:0 10px 26px #1f293733;color:#24313d;animation:toast-in .18s ease-out}.toast button{margin-left:auto;border:0;background:transparent;font-size:20px;line-height:1;cursor:pointer;color:#73808d}.toast-success{border-left:4px solid #2f9b61}.toast-error{border-left:4px solid #d74b4b}.toast-warning{border-left:4px solid #d99a20}@keyframes toast-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}.theme-dark .toast{background:#202c38;color:#e8edf3;border-color:#40505e}


html,body{max-width:100%;overflow-x:hidden}.article-card img,.editor img,.content-links img,video{max-width:100%;height:auto}.editor table{max-width:100%;overflow-wrap:anywhere}@media(max-width:480px){main{padding-left:14px;padding-right:14px}.search-filters{display:grid;grid-template-columns:1fr 1fr}.search-filters input,.search-filters select,.search-filters button{width:100%;min-width:0}.search-filters input:first-child{grid-column:1/-1}.forum-topic-card{padding:16px}.topic-meta{align-items:flex-start;flex-direction:column;gap:4px}}

.empty-state{min-height:220px;display:grid;place-content:center;text-align:center}.empty-state p{color:#64748b}
.status-badge{display:inline-block;margin:0 6px 0 0;padding:3px 8px;border-radius:999px;font-size:11px;font-weight:700;letter-spacing:.02em;background:#eef2f6;color:#475569}
.status-draft{background:#eef2f6;color:#475569}
.status-review{background:#fff4d6;color:#8a5b00}
.status-published{background:#e6f6ec;color:#1f7a43}
.status-hidden{background:#f3e8ff;color:#6b21a8}
.status-deleted{background:#fde8e8;color:#b42318}
.wiki-search-results{display:grid;gap:14px}
.wiki-article{max-width:820px}
.wiki-article h1{margin:0 0 12px}
.wiki-lead{color:#666;font-size:17px;line-height:1.55}
.wiki-article-body{min-height:0}
.theme-dark .forum-header h1,.theme-dark .forum-categories h2,.theme-dark .forum-category b,.theme-dark .forum-category small,.theme-dark .forum-category small+small,.theme-dark .article-card h2,.theme-dark .article-card h3,.theme-dark .forum-topic-card h3 a{color:var(--ink)} .theme-dark .forum-header p,.theme-dark .forum-category p,.theme-dark .article-card p,.theme-dark .empty-state p{color:var(--muted)}

.editor .table-cell-selected{outline:2px solid var(--accent,#d98b00);outline-offset:-2px;background:color-mix(in srgb,var(--accent,#d98b00) 12%,transparent)}

/* Refined forum header: compact identity control and prominent search */
.forum-header{align-items:center;gap:24px}
.forum-user{position:relative;background:transparent;border:0;border-radius:0;padding:0;display:flex;align-items:center;gap:8px;color:var(--ink)}
.forum-user .theme-toggle{flex:0 0 auto}
.user-menu-button{min-height:42px;padding:5px 10px;border:1px solid #d8dce2;border-radius:9px;background:var(--surface,#fff);box-shadow:none;color:var(--ink);font-weight:700}
.user-menu-button:hover,.user-menu-button:focus-visible{border-color:#d49300;background:#fffaf0}
.forum-search-top{margin:0 0 26px;padding:12px;border:1px solid #e1e7ee;border-radius:10px;background:var(--surface,#fff);box-shadow:0 3px 10px rgba(30,45,60,.04)}
.forum-search-top input{flex:1;min-width:220px}
.theme-dark .user-menu-button,.theme-dark .forum-search-top{background:#202c38;border-color:#40505e;color:var(--ink)}
.theme-dark .user-menu-button:hover,.theme-dark .user-menu-button:focus-visible{background:#2b3b4a;border-color:#d49300}
@media(max-width:650px){.forum-header{align-items:flex-start;flex-direction:column;gap:12px}.forum-user{width:100%;justify-content:flex-end}.forum-search-top{display:grid;grid-template-columns:1fr 1fr}.forum-search-top input{grid-column:1/-1;min-width:0}}
@media(max-width:480px){.forum-search-top{grid-template-columns:1fr}.forum-search-top input,.forum-search-top select,.forum-search-top button{grid-column:auto;width:100%}}
.editor-modal-backdrop{position:fixed;inset:0;background:rgba(15,23,42,.48);display:flex;align-items:center;justify-content:center;z-index:1000;padding:16px}.editor-modal{width:min(460px,100%);background:var(--surface,#fff);color:var(--text,#172033);border:1px solid var(--border,#d7dce5);border-radius:12px;box-shadow:0 18px 55px rgba(0,0,0,.28);padding:22px;display:grid;gap:12px}.editor-modal h2{margin:0 0 4px}.editor-modal label{display:grid;gap:5px;font-weight:600}.editor-modal input{width:100%;box-sizing:border-box;padding:9px;border:1px solid var(--border,#cfd5dd);border-radius:6px;background:var(--surface,#fff);color:inherit}.editor-modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:6px}.editor-modal-actions button{padding:9px 16px;border:1px solid var(--border,#cfd5dd);border-radius:6px;background:transparent;color:inherit}.editor-modal-actions .primary{background:var(--accent,#d98b00);border-color:var(--accent,#d98b00);color:#fff}@media(max-width:480px){.editor-modal{padding:16px}}
.editor th,.editor td{resize:horizontal;overflow:auto;min-width:48px}.editor th:focus,.editor td:focus{outline:2px solid var(--accent,#d98b00);outline-offset:-2px}
.editor th,.editor td{position:relative}.editor th:hover,.editor td:hover{box-shadow:inset -3px 0 0 var(--accent,#d98b00);cursor:col-resize}.editor table{table-layout:auto}
.editor-toolbar button[data-table-action="merge"]:before{content:"⇄";font-size:18px}.editor-toolbar button[data-table-action="split"]:before{content:"╋";font-size:17px}.editor-toolbar button[data-table-action="props"]:before{content:"⚙";font-size:16px}.editor-toolbar button[data-table-action]{font-size:0}.editor-toolbar button[data-table-action]:before{display:inline-block}
.editor th,.editor td{resize:none}.table-resize-handle{position:absolute;width:14px;height:14px;background:var(--accent,#d98b00);border:2px solid #fff;border-radius:3px;cursor:nwse-resize;z-index:1100;box-shadow:0 1px 4px rgba(0,0,0,.3)}
.table-resize-handle{cursor:nwse-resize;touch-action:none}
/* Compact forum search */
.forum-search{max-width:920px;margin:4px auto 22px;padding:0 18px}
.forum-search-primary{display:flex;gap:8px;align-items:center;padding:8px 10px;border:1px solid #e1e7ee;border-radius:10px;background:var(--surface,#fff);box-shadow:0 3px 10px rgba(30,45,60,.04)}
.forum-search-primary input{flex:1;min-width:0;border:0;padding:9px 10px;font:inherit;outline:0;background:transparent;color:var(--ink)}
.forum-search-primary button{min-height:38px;padding:8px 14px;border:1px solid #d5dde6;border-radius:7px;background:#fffaf0;color:#6f4d0b;font:inherit;cursor:pointer;white-space:nowrap}
.forum-search-primary button[type=submit]{background:linear-gradient(135deg,#f6b719,#e39a00);border-color:#d49300;color:#fff;font-weight:700}
.forum-search-primary button:hover,.forum-search-primary button:focus-visible{border-color:#d49300;outline:2px solid #edc466;outline-offset:1px}
.forum-search-top{margin-top:8px;margin-bottom:0;box-shadow:none}
.theme-dark .forum-search-primary{background:#202c38;border-color:#40505e}.theme-dark .forum-search-primary button{background:#263746;color:var(--ink);border-color:#526577}
@media(max-width:480px){.forum-search{padding:0;margin-left:0;margin-right:0}.forum-search-primary{flex-wrap:wrap}.forum-search-primary input{flex-basis:100%}.forum-search-primary button{flex:1}.forum-search-top{display:grid;grid-template-columns:1fr}.forum-search-top input,.forum-search-top select,.forum-search-top button{width:100%}}
/* Forum visual pass: old-forum inspired rows and admin/profile surfaces */
.section-head{display:flex;align-items:center;justify-content:space-between;gap:16px;border-bottom:1px solid var(--line);padding-bottom:14px}.section-head h1{margin:0}.topic-list{display:grid;gap:10px;margin-top:20px}.topic-row{display:grid;grid-template-columns:minmax(0,1fr) 210px;gap:20px;align-items:center;padding:20px 22px}.topic-row h2{margin:0 0 8px;font-size:19px}.topic-row h2 a{color:var(--ink)}.topic-row p{margin:0;color:var(--muted);line-height:1.45}.topic-row-meta{display:flex;flex-direction:column;align-items:flex-end;gap:4px;color:#63738a;font-size:13px}.topic-row-meta b{color:var(--ink);font-size:14px}.topic-row-meta time{font-size:12px}.pagination{display:flex;justify-content:center;align-items:center;gap:18px;margin:24px 0}.pagination button{padding:9px 14px;border:1px solid #d5dde6;border-radius:7px;background:#fffaf0;cursor:pointer}.profile-cover{margin-top:18px}.profile-avatar{border:3px solid #fff;box-shadow:0 3px 12px #1f293333}.profile-page,main:has(#profile-content){max-width:1100px}.profile-page main,main:has(#profile-content){padding-top:30px}main:has(#profile-content)>label{display:grid;gap:6px;max-width:520px;margin:12px 0}main:has(#profile-content)>input,main:has(#profile-content)>textarea{max-width:520px}main:has(#profile-content)>button{margin:8px 8px 8px 0}.admin-page nav,main:has(>h1+ p+nav) nav{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:24px}.admin-page nav p,main:has(>h1+ p+nav) nav p{margin:0}.admin-page nav a,main:has(>h1+ p+nav) nav a{display:block;padding:17px 18px;border:1px solid #e1e7ee;border-radius:10px;background:var(--surface,#fff);color:var(--ink);box-shadow:0 3px 10px #1e2d3c08;transition:.16s}.admin-page nav a:hover,main:has(>h1+ p+nav) nav a:hover{border-color:#edc466;transform:translateY(-1px)}
@media(max-width:700px){.topic-row{grid-template-columns:1fr}.topic-row-meta{align-items:flex-start}.admin-page nav,main:has(>h1+ p+nav) nav{grid-template-columns:1fr 1fr}}
@media(max-width:480px){.topic-row{padding:16px}.admin-page nav,main:has(>h1+ p+nav) nav{grid-template-columns:1fr}.section-head{align-items:flex-start;flex-direction:column}}

/* Final author workspace layout */
main:has(#new-topic){max-width:1440px;padding-left:44px;padding-right:44px}
main:has(#forum-shell){min-height:0}
main:has(#new-topic) #new-topic{max-width:none;width:100%;margin-top:18px}
main:has(#new-topic) #new-topic>label{max-width:860px}
main:has(#new-topic) .editor-shell{width:100%}
main:has(#new-topic) .editor-toolbar{max-width:100%;padding:7px 9px;gap:5px;background:#f5f7fa}
main:has(#new-topic) .editor{min-height:360px;width:100%}
main:has(#new-topic) .editor-actions{justify-content:flex-start;padding-top:4px}
main:has(#new-topic) .editor-actions #new-submit{min-width:150px}
@media(max-width:900px){main:has(#new-topic){padding-left:24px;padding-right:24px}}
@media(max-width:650px){main:has(#new-topic){padding-left:14px;padding-right:14px}main:has(#new-topic) .editor{min-height:260px}}

/* Profile surface */
main:has(#profile-cover){max-width:1100px;padding-top:30px}
main:has(#profile-cover)>p:first-child{margin:0 0 18px;color:var(--muted)}
main:has(#profile-cover)>h1{margin:0 0 18px}
main:has(#profile-cover) .profile-cover{height:170px;margin:0 0 18px;border:1px solid #dbe2ea;border-radius:12px;background:linear-gradient(135deg,#e8eef5,#d8e2ed);overflow:hidden}
main:has(#profile-cover) .profile-cover img{width:100%;height:100%;object-fit:cover}
main:has(#profile-cover)>label{display:grid;gap:7px;max-width:620px;margin:14px 0;color:var(--ink);font-weight:700}
main:has(#profile-cover)>label input{width:100%;padding:10px;border:1px solid #d5dde6;border-radius:8px;background:var(--surface,#fff);font:inherit;font-weight:400}
main:has(#profile-cover) #avatarPreview{width:88px;height:88px;margin:4px 0 18px;border:4px solid #fff;box-shadow:0 4px 14px #1e2d3c33}
main:has(#profile-cover)>button{padding:10px 16px;border:1px solid #d5dde6;border-radius:8px;background:#fffaf0;color:#76520d;font-weight:700;cursor:pointer}
main:has(#profile-cover)>button:hover{border-color:#d49300;background:#fff2cd}
main:has(#profile-cover)>p:not(:first-child){color:var(--muted);margin:20px 0 8px}
main:has(#profile-cover)>input[type=file]{padding:10px;border:1px solid #d5dde6;border-radius:8px;background:var(--surface,#fff)}
main:has(#profile-cover) #status{min-height:20px;color:var(--muted)}
main:has(#profile-cover)>h2{margin-top:34px;padding-top:22px;border-top:1px solid var(--line)}
@media(max-width:650px){main:has(#profile-cover){padding:24px 18px 42px}main:has(#profile-cover) .profile-cover{height:130px}}

/* Section surface */
main:has(#section){min-height:0}
main:has(#section) .section-head button{padding:9px 14px;border:1px solid #d5dde6;border-radius:8px;background:#fffaf0;color:#76520d;font:inherit;font-weight:700;cursor:pointer}
main:has(#section) .section-head button:hover{border-color:#d49300;background:#fff2cd}
main:has(#section)>p:last-child{color:var(--muted)}
main#section{min-height:0}
main#section .section-head button{padding:9px 14px;border:1px solid #d5dde6;border-radius:8px;background:#fffaf0;color:#76520d;font:inherit;font-weight:700;cursor:pointer}
main#section .section-head button:hover{border-color:#d49300;background:#fff2cd}

/* Header search and dark menu refinement */
.forum-header{align-items:flex-start}
.forum-header-copy{flex:1;min-width:0}
.forum-header-side{width:min(390px,42%);display:flex;flex-direction:column;align-items:stretch;gap:10px}
.forum-search-header{width:100%;max-width:none;margin:0;padding:0}
.forum-search-header .forum-search-primary{padding:6px 8px}
.forum-header-side .forum-user{justify-content:flex-end;min-height:50px}
.forum-header-side .user-menu-button{min-height:50px;padding:6px 12px;border-radius:11px}
.forum-header-side .forum-user-avatar{width:38px;height:38px}
.theme-dark .user-menu a,.theme-dark .user-menu button{background:#202c38;color:#e8edf3}
.theme-dark .user-menu a:hover,.theme-dark .user-menu button:hover{background:#2b3b4a}
.theme-dark .theme-toggle{background:#263746;color:#e8edf3;border-color:#526577}
@media(max-width:800px){.forum-header-side{width:min(100%,520px);margin-left:auto}.forum-header-side .forum-user{justify-content:flex-end}}
@media(max-width:650px){.forum-header-side{width:100%}.forum-header-side .forum-user{justify-content:flex-start}.forum-header-side .user-menu{right:auto;left:0}}

/* Dark filter controls */
.theme-dark select option{background:#263746;color:#f2f5f7}
.theme-dark .forum-search-filters select,.theme-dark .forum-search-filters input{background:#263746;color:#f2f5f7;border-color:#526577}
.theme-dark .forum-search-filters button{background:#2b3b4a;color:#f2f5f7;border-color:#526577}
.forum-header-side{position:relative}
.forum-search-filters{position:relative;z-index:5}
@media(min-width:801px){.forum-search-filters{display:flex;flex-wrap:wrap;justify-content:flex-end}.forum-search-filters>*{min-width:130px}.forum-search-filters input#author{min-width:180px}}
.theme-dark select,.theme-dark select option{color-scheme:dark;color:#f2f5f7}
.theme-dark .forum-search-primary input::placeholder,.theme-dark .forum-search-filters input::placeholder{color:#aebbc8;opacity:1}
main:has(#edit-form){max-width:1440px;padding-left:44px;padding-right:44px}
#edit-form{display:grid;gap:10px;max-width:none}
#edit-form>label{display:grid;gap:7px;font-weight:700}
#edit-form input,#edit-form textarea{width:100%;padding:10px;border:1px solid #d5dde6;border-radius:8px;font:inherit}
#edit-form .editor{min-height:360px}
#edit-form>button{justify-self:start;padding:10px 16px;border:0;border-radius:8px;background:linear-gradient(135deg,#f6b719,#e39a00);color:#fff;font-weight:700;cursor:pointer}
@media(max-width:650px){main:has(#edit-form){padding-left:14px;padding-right:14px}#edit-form .editor{min-height:260px}}

/* Компактная шапка форума: профиль над поиском без лишней рамки */
.forum-header-side{display:flex;flex-direction:column}.forum-header-side>.forum-user{order:0;justify-content:flex-end}.forum-header-side>.forum-search-header{order:1}.forum-header-side>.forum-user .user-menu-button{border:0;background:transparent;border-radius:0;padding:4px 0;box-shadow:none}.forum-header-side>.forum-user .user-menu-button:hover,.forum-header-side>.forum-user .user-menu-button:focus-visible{border:0;background:transparent;box-shadow:none}@media(max-width:650px){.forum-header-side>.forum-user{justify-content:flex-start}}


/* Профиль закреплён в верхней части правой колонки; тема доступна из меню */
.forum-header-side{align-items:stretch}.forum-header-side>.forum-user{margin-top:0;align-self:flex-end}.forum-header-side>.forum-user .user-menu-button{font-size:15px}.forum-header-side>.forum-user .theme-toggle{display:none}.user-menu #theme-toggle{display:block;width:100%;padding:9px;text-align:left;border:0;background:transparent;color:var(--ink);cursor:pointer}.user-menu #theme-toggle:hover{background:#fff7df}.theme-dark .user-menu #theme-toggle:hover{background:#2b3b4a}@media(max-width:650px){.forum-header-side>.forum-user{align-self:flex-start}}


/* Профиль в правом верхнем углу шапки форума */
.forum-header{position:relative}.forum-header-side{position:absolute;top:0;right:0;width:min(390px,42%)}.forum-header-side>.forum-user{align-self:flex-end}@media(max-width:800px){.forum-header-side{position:relative;top:auto;right:auto;width:min(100%,520px);margin-left:auto}}@media(max-width:650px){.forum-header-side{width:100%;margin-left:0}.forum-header-side>.forum-user{align-self:flex-start}}


/* Точное позиционирование шапки форума относительно всей панели */
main:has(#forum-shell){position:relative}.forum-header-side{position:absolute;top:30px;right:42px;width:390px}.forum-header{position:static}.forum-header-side>.forum-user{justify-content:flex-end}@media(max-width:800px){main:has(#forum-shell){position:relative}.forum-header-side{position:relative;top:auto;right:auto;width:min(100%,520px)}}@media(max-width:650px){.forum-header-side{width:100%}}


.shared-forum-header{position:absolute;top:30px;right:42px;z-index:5}.shared-forum-header .user-menu-button{display:inline-flex;align-items:center;gap:7px;border:0;background:transparent;color:var(--ink);font-weight:700;cursor:pointer}.shared-forum-header .user-menu{right:0;top:44px}.shared-forum-header .user-menu button{font:inherit}.shared-forum-header .forum-user-avatar{width:38px;height:38px}@media(max-width:650px){.shared-forum-header{position:relative;top:auto;right:auto;margin:0 0 18px;text-align:right}}


.profile-meta{color:var(--muted);margin:-8px 0 18px}.profile-topic{display:flex;justify-content:space-between;gap:16px;padding:12px 0;border-bottom:1px solid var(--line)}.profile-topic a{font-weight:700;color:var(--ink)}.profile-topic small{color:var(--muted)}


.topic-author{display:flex;align-items:center;gap:10px;margin:10px 0 18px;color:var(--muted)}.topic-author .forum-user-avatar{width:38px;height:38px}.topic-author span{display:flex;flex-direction:column;gap:3px}.topic-author b{color:var(--ink)}.topic-author small{font-size:12px}


.post-author{display:flex;align-items:center;gap:8px;margin-bottom:8px;color:var(--ink)}.topic-post{margin-bottom:12px}.topic-post button{margin-top:10px}


.post-author .forum-user-avatar{width:28px;height:28px}


@media(max-width:600px){.topic-author{margin-top:8px}.topic-post{padding:14px}.topic-post button{margin-right:4px;margin-bottom:4px}.post-author{font-size:14px}.topic-post .article-card{min-width:0}}


/* Post-release editor polish: readable dark theme and unclipped toolbar hints */
.theme-dark .editor-toolbar{background:#202c38;border-color:#40505e}
.theme-dark .editor-toolbar button,.theme-dark .editor-toolbar .editor-select{background:#263746;color:#e8edf3;border-color:#526577}
.theme-dark .editor{background:#202c38;color:#e8edf3;border-color:#526577}
.theme-dark .editor:empty:before{color:#aebbc8}
.theme-dark .editor th{background:#2b3b4a;color:#e8edf3}
.theme-dark .editor td,.theme-dark .editor th{border-color:#526577}
.editor-toolbar button:hover:after,.editor-toolbar button:focus-visible:after{top:auto;bottom:calc(100% + 7px);left:50%;transform:translateX(-50%);padding:5px 8px;line-height:1.2;box-shadow:0 4px 12px #0004}
.editor-toolbar button:focus-visible{outline:2px solid #edc466;outline-offset:2px}

/* Narrow-screen layout pass: keep forum filters usable without horizontal scrolling */
@media(max-width:650px){
  main:has(#forum-shell){padding-left:14px;padding-right:14px;overflow-x:hidden}
  .forum-search-filters{display:grid;grid-template-columns:1fr 1fr;gap:8px}
  .forum-search-filters>*{min-width:0;width:100%}
  .forum-search-filters input#author,.forum-search-filters input#q{grid-column:1/-1;min-width:0}
  .forum-search-filters button{min-height:38px}
}
@media(max-width:420px){
  .forum-search-filters{grid-template-columns:1fr}
  .forum-search-filters input#author,.forum-search-filters input#q{grid-column:auto}
  .forum-header-side{gap:8px}
  .forum-header-side>.forum-user{align-self:stretch;justify-content:flex-start}
}

/* Editor dialogs and table resizing on touch devices */
.editor-modal-backdrop{overflow-y:auto;align-items:flex-start}
.editor-modal{max-height:calc(100dvh - 32px);overflow-y:auto;margin:auto}
.table-resize-handle{touch-action:none}
@media(max-width:480px){
  .editor-modal-backdrop{padding:8px}
  .editor-modal{width:100%;max-height:calc(100dvh - 16px);padding:14px}
  .editor-modal-actions{position:sticky;bottom:0;padding-top:8px;background:var(--surface,#fff)}
  .table-resize-handle{width:18px;height:18px}
}

.editor .media-selected{outline:2px solid var(--accent,#d98b00);outline-offset:2px}

.notification-link{display:inline-block;margin-top:8px;color:var(--gold-dark);font-weight:600}.theme-dark .notification-link{color:#f6c453}

/* Valhalla design tokens */
:root{
  --color-bg:#f3efe6;--color-bg-elevated:#f8f4ec;--color-surface:#f7f3eb;--color-surface-2:#ebe4d6;--color-surface-hover:#efe8d8;
  --color-text:#1c1914;--color-text-secondary:#3a352c;--color-text-muted:#6a6358;
  --color-accent:#8a6730;--color-accent-hover:#a67d3c;--color-accent-soft:#a98950;
  --color-border:rgba(70,55,35,.16);--color-border-strong:rgba(70,55,35,.28);--color-overlay:rgba(25,26,28,.45);
  --shadow-sm:0 4px 16px rgba(40,32,20,.06);--shadow-md:0 12px 32px rgba(40,32,20,.1);
  --radius-sm:4px;--radius-md:6px;--container-width:1280px;--page-pad:24px;
  --transition-fast:160ms ease;--transition-normal:220ms ease;
  --font-editorial:"Cormorant Garamond","Iowan Old Style",Palatino,Georgia,serif;
  --font-ui:"Manrope","Segoe UI",Inter,sans-serif;
  --space-4:4px;--space-8:8px;--space-12:12px;--space-16:16px;--space-24:24px;--space-32:32px;--space-48:48px;--space-64:64px;
  --text-xs:12px;--text-sm:13px;--text-md:15px;--text-lg:17px;--text-xl:20px;
  --heading-sm:20px;--heading-md:clamp(24px,2.4vw,32px);--heading-lg:clamp(32px,4vw,48px);--heading-xl:clamp(40px,5vw,64px);--heading-hero:clamp(44px,6vw,72px);
  --vg-bg:var(--color-bg);--vg-surface:var(--color-surface);--vg-surface-soft:var(--color-surface-2);--vg-text:var(--color-text);--vg-muted:var(--color-text-muted);--vg-border:var(--color-border);--vg-accent:var(--color-accent);--vg-accent-strong:var(--color-accent-hover);--vg-success:#2f9b61;--vg-danger:#d74b4b;--vg-radius:var(--radius-md);--vg-control-radius:var(--radius-sm);--vg-focus:#1d78c1;
  --ink:var(--color-text);--muted:var(--color-text-muted);--line:var(--color-border);--gold:var(--color-accent);
}
html[data-theme="dark"],html.theme-dark,.theme-dark{
  --color-bg:#090b0e;--color-bg-elevated:#0d1115;--color-surface:#0d1115;--color-surface-2:#12171c;--color-surface-hover:#171d24;
  --color-text:#e7e4dc;--color-text-secondary:#c8c4ba;--color-text-muted:#92979f;
  --color-accent:#b99a5b;--color-accent-hover:#d4bc83;--color-accent-soft:#d4bc83;
  --color-border:rgba(185,154,91,.2);--color-border-strong:rgba(185,154,91,.35);--color-overlay:rgba(0,0,0,.55);
  --shadow-sm:0 4px 16px rgba(0,0,0,.28);--shadow-md:0 16px 40px rgba(0,0,0,.4);
  color-scheme:dark;
}
/* Valhalla Gold token application */
body{background:var(--vg-bg);color:var(--vg-text)}
main{background:var(--vg-surface);border-color:var(--vg-border)}
.article-card,.forum-topic-card,.forum-category,.data-card{background:var(--vg-surface);border-color:var(--vg-border)}
.search-filters input,.search-filters select,.search-filters button,.editor-toolbar,.editor-actions button,.editor{border-color:var(--vg-border);background:var(--vg-surface);color:var(--vg-text)}
.forum-category b,.forum-action,.topic-meta{color:var(--vg-accent-strong)}
.forum-create-button,.editor-actions button#new-submit{background:var(--vg-accent);border-color:var(--vg-accent)}
.theme-dark .search-filters input,.theme-dark .search-filters select,.theme-dark .search-filters button,.theme-dark .editor-toolbar,.theme-dark .editor-actions button,.theme-dark .editor{background:var(--vg-surface-soft);border-color:var(--vg-border);color:var(--vg-text)}
/* Shared Valhalla Gold header and navigation */
.top,.forum-header{background:var(--vg-surface);color:var(--vg-text)}
.top{border-bottom:1px solid var(--vg-border)}
.top nav{color:var(--vg-text)}
.top nav a:hover,.block-head a{color:var(--vg-accent-strong)}
.forum-user{background:var(--vg-surface-soft);border-color:var(--vg-border);color:var(--vg-muted);border-radius:var(--vg-radius)}
.user-menu-button,.forum-user button,.theme-toggle{border-color:var(--vg-border);background:var(--vg-surface);color:var(--vg-text)}
.user-menu{background:var(--vg-surface);border:1px solid var(--vg-border);box-shadow:var(--vg-shadow,0 10px 28px rgba(40,52,65,.12))}
.search-filters{background:var(--vg-surface);border-color:var(--vg-border)}
.search-filters button{color:var(--vg-accent-strong)}
.theme-dark .top,.theme-dark .forum-header{background:var(--vg-surface);color:var(--vg-text);border-color:var(--vg-border)}
/* Content cards and empty states */
.article-card,.forum-topic-card,.data-card{padding:22px;transition:border-color .16s,box-shadow .16s,transform .16s}
.article-card:hover,.forum-topic-card:hover,.data-card:hover{border-color:var(--vg-accent);box-shadow:0 8px 22px rgba(30,45,60,.08)}
.article-card h2,.article-card h3,.forum-topic-card h3{color:var(--vg-text)}
.article-card p,.forum-topic-card p,.empty-state p{color:var(--vg-muted)}
.empty-state{border:1px dashed var(--vg-border);border-radius:var(--vg-radius);background:var(--vg-surface-soft);padding:32px}
.theme-dark .empty-state{background:var(--vg-surface-soft);border-color:var(--vg-border)}
/* Material and editor layout */
#page>h1{font-size:34px;line-height:1.15;margin:24px 0 12px;color:var(--vg-text)}
#page>p{color:var(--vg-muted)}
#page>.article-card{max-width:960px;margin:18px 0;line-height:1.7}
#posts{display:grid;gap:14px;max-width:960px}
.topic-post{line-height:1.65}
.topic-post>small{display:block;color:var(--vg-muted);margin-bottom:10px}
#reply-form{max-width:960px;margin-top:22px}
#new-topic,.editor{width:100%;max-width:none}
.editor{min-height:320px;font-size:16px;line-height:1.7}
.editor-footer{display:flex;justify-content:space-between;align-items:center;color:var(--vg-muted);margin-top:8px}
.editor-actions{margin-top:14px}
/* Mobile UX pass */
@media(max-width:650px){
  .top{height:auto;min-height:64px;padding:14px 18px;gap:14px;flex-wrap:wrap}
  .top nav{order:3;width:100%;gap:18px;overflow-x:auto;padding-bottom:2px}
  .locale{margin-left:auto}
  .forum-header{gap:14px}
  .forum-header .forum-user{justify-content:flex-end;flex-wrap:wrap}
  .search-filters{width:100%}
  .editor-toolbar{max-width:100%;overflow-x:auto;align-items:center}
  .editor-toolbar button,.editor-toolbar select{flex:0 0 auto}
}
@media(max-width:420px){
  .brand{font-size:21px}
  .top nav{font-size:14px;gap:14px}
  .forum-header h1{font-size:24px}
  .forum-user{width:100%;justify-content:space-between}
  .editor{min-height:260px}
}

/* Valhalla Gold page surfaces: consistent cards, actions and empty states */
.vg-card,.article-card,.forum-category{border:1px solid var(--vg-border);border-radius:12px;background:var(--vg-surface);box-shadow:0 6px 18px rgba(20,35,50,.06);transition:border-color .18s ease,transform .18s ease,box-shadow .18s ease}
.vg-card:hover,.article-card:hover,.forum-category:hover{border-color:var(--vg-accent);box-shadow:0 10px 24px rgba(20,35,50,.1);transform:translateY(-1px)}
.empty-state{padding:32px;text-align:center;color:var(--vg-muted);border:1px dashed var(--vg-border);border-radius:12px;background:var(--vg-surface-soft)}
.vg-primary,.forum-create-button,.editor-actions .primary{background:var(--vg-accent);color:#17212b;border:1px solid var(--vg-accent);border-radius:8px;font-weight:700;box-shadow:0 4px 12px rgba(245,174,8,.2)}
.vg-primary:hover,.forum-create-button:hover,.editor-actions .primary:hover{background:var(--vg-accent-strong);border-color:var(--vg-accent-strong)}
.theme-dark .vg-card,.theme-dark .article-card,.theme-dark .forum-category{box-shadow:0 8px 24px rgba(0,0,0,.18)}

.editor-toolbar button{min-width:38px;padding:8px 9px;font-weight:700}.editor-toolbar button[aria-label]{font-size:14px}.editor-toolbar{display:flex;flex-wrap:wrap;gap:6px;align-items:center}.editor-toolbar .editor-select{min-height:38px}


/* Profile control stays neutral; gold is reserved for primary actions */
.user-menu-button,.user-menu-button:hover,.user-menu-button:focus-visible{background:transparent!important;border-color:transparent!important;box-shadow:none!important}
.theme-dark .user-menu-button,.theme-dark .user-menu-button:hover,.theme-dark .user-menu-button:focus-visible{background:transparent!important;border-color:transparent!important}


/* Filters stay compact and never cover the create action */
.forum-search-filters{width:min(100%,390px);max-width:390px;padding:10px;gap:8px;z-index:3;background:var(--vg-surface);border:1px solid var(--vg-border);border-radius:10px;box-shadow:0 8px 20px rgba(20,35,50,.12)}
.forum-search-filters>*{min-width:0!important;max-width:100%}.forum-search-filters input,.forum-search-filters select{height:38px}.forum-create-button,#open-new-topic{position:relative;z-index:8}
@media(max-width:650px){.forum-search-filters{width:100%;max-width:100%}}


.forum-user{background:transparent!important;border-color:transparent!important;box-shadow:none!important}


/* Larger profile identity */
.forum-header-side>.forum-user .user-menu-button,.shared-forum-header .user-menu-button{font-size:19px;gap:9px}
.forum-header-side>.forum-user .forum-user-avatar,.shared-forum-header .forum-user-avatar{width:49px;height:49px}
@media(max-width:650px){.forum-header-side>.forum-user .user-menu-button,.shared-forum-header .user-menu-button{font-size:18px}.forum-header-side>.forum-user .forum-user-avatar,.shared-forum-header .forum-user-avatar{width:46px;height:46px}}


.forum-search-filters{margin-bottom:58px}
@media(max-width:650px){.forum-search-filters{margin-bottom:18px}.forum-search-filters[hidden]{margin-bottom:0}}


/* Keep create action below expanded filter panel */
#forum-search-filters:not([hidden]) ~ #forum-categories #open-new-topic{transform:translateY(92px);margin-bottom:92px}
@media(max-width:650px){#forum-search-filters:not([hidden]) ~ #forum-categories #open-new-topic{transform:translateY(12px);margin-bottom:12px}}


/* Expanded filters stay in normal flow and never overlap actions */
.forum-search-top{position:static!important;display:flex;flex-wrap:wrap;align-content:flex-start}
#forum-search-filters:not([hidden]) ~ #forum-categories #open-new-topic{transform:none;margin-bottom:0}


.forum-search-filters{width:330px!important;max-width:330px!important;padding:8px!important;gap:6px!important}.forum-search-filters>*{min-width:0!important;width:calc(50% - 3px)!important}.forum-search-filters input#author{width:100%!important}.forum-search-filters button{min-height:34px;padding:6px 10px}@media(max-width:650px){.forum-search-filters{width:100%!important;max-width:100%!important}.forum-search-filters>*{width:100%!important}}


/* Filter popover overlays content when opened */
.forum-search-header{position:relative}.forum-search-top{position:absolute!important;top:calc(100% + 6px);right:0;z-index:30!important;margin:0!important;width:330px!important;max-width:330px!important;background:var(--vg-surface)!important;box-shadow:0 14px 30px rgba(0,0,0,.2)}
@media(max-width:650px){.forum-search-top{left:0;right:auto;width:100%!important;max-width:100%!important}}


/* Visible hierarchy for nested forum categories */
.forum-category-depth-1{margin-left:28px!important;width:calc(100% - 28px)!important;background:var(--vg-surface-soft)!important;border-left:3px solid var(--vg-accent)!important}.forum-category-depth-2{margin-left:56px!important;width:calc(100% - 56px)!important;background:var(--vg-surface-soft)!important;border-left:3px solid var(--vg-border-strong,var(--vg-accent))!important}.forum-category-depth-1 b:before,.forum-category-depth-2 b:before{content:'↳ ';color:var(--vg-accent-strong);font-weight:700}.forum-category-depth-1 small,.forum-category-depth-2 small{color:var(--vg-muted)}


.forum-category-group{margin:18px 0;border:1px solid var(--vg-border);border-radius:12px;background:var(--vg-surface);overflow:hidden}.forum-category-group h3{margin:0;padding:16px 20px;font-size:18px;border-bottom:1px solid var(--vg-border);background:var(--vg-surface-soft)}.forum-category-group>p{margin:0;padding:8px 20px;color:var(--vg-muted);font-size:13px}.forum-category-group .forum-category{margin:0;border-radius:0;border-width:0 0 1px}.forum-category-group .forum-category:last-child{border-bottom:0}


.forum-category-group .forum-category-depth-1{margin-left:0!important;width:100%!important;border-left:0!important;background:var(--vg-surface)!important}.forum-category-group .forum-category-depth-1 b:before{content:''}


/* Compact subsection links: one parent row, no cards per child. */
.forum-section-summary{display:grid;grid-template-columns:minmax(0,1fr) minmax(140px,230px);align-items:center;gap:12px 24px;padding:16px 20px;background:var(--vg-surface,#fff);border:1px solid var(--vg-border,#d8e0e8);border-radius:10px}
.forum-section-summary-main{min-width:0}
.forum-section-title{font-size:16px;font-weight:700;color:var(--vg-text,var(--ink))}
.forum-section-description{margin:5px 0 0;font-size:13px;line-height:1.45;color:var(--vg-muted,#667085)}
.forum-subsection-links{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 7px;margin-top:6px;font-size:13px;line-height:1.6}
.forum-subsection-links>span{color:var(--vg-muted,#667085)}
.forum-subsection-links>a{color:var(--vg-text,var(--ink));overflow-wrap:anywhere}
.forum-subsection-links>a:not(:last-child)::after{content:',';color:var(--vg-muted,#667085)}
.forum-section-title:hover,.forum-subsection-links>a:hover{text-decoration:underline;text-underline-offset:3px}
.forum-section-summary-meta{display:flex;flex-direction:column;gap:5px;font-size:12px;line-height:1.45;color:var(--vg-muted,#667085);overflow-wrap:anywhere}
.home-hero{display:grid;grid-template-columns:minmax(0,1fr) minmax(300px,380px);gap:28px 36px;align-items:start;margin:8px 0 28px}
.home-hero-copy{min-width:0;max-width:none}
.home-hero-copy h1{font-size:38px;margin:0 0 16px;line-height:1.15}
.home-hero-copy p{font-size:16px;line-height:1.55;color:#666;margin:0 0 18px;overflow-wrap:break-word}
.home-search{display:flex;height:48px;border:2px solid var(--gold);border-radius:6px;width:100%;max-width:100%;min-width:0}
.home-search input{flex:1;min-width:0;border:0;padding:0 16px;font-size:15px;outline:0;background:transparent}
.home-search button{width:56px;flex:0 0 56px;border:0;background:var(--gold);color:#fff;font-size:20px;cursor:pointer}
.home-data{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px;margin-top:14px;width:100%;min-width:0}
.home-data .data-card{min-width:0;min-height:0;padding:10px 12px;gap:2px;overflow:hidden}
.home-data .data-card b{font-size:13px;line-height:1}
.home-data .data-card strong{font-size:13px;line-height:1.25;overflow-wrap:anywhere}
.home-data .data-card small{font-size:11px;color:#888;line-height:1.3;overflow-wrap:anywhere}
.home-news{min-width:0}
.home-news h2{margin:0 0 16px;font-size:24px}
.news-feed{max-height:280px;overflow:auto;padding-right:8px}
.news-feed-item{display:block;padding:14px 8px 14px 0;border-bottom:1px solid var(--line);color:inherit}
.news-feed-item:last-child{border-bottom:0}
.news-feed-item h3{margin:0 0 6px;font-size:16px}
.news-feed-item p{margin:0 0 6px;color:#666;font-size:14px;line-height:1.45}
.news-feed-item time{color:#999;font-size:12px}
.home-news .empty-state{min-height:0;max-width:none;padding:18px 0;background:transparent;border:0}
@media(max-width:900px){.home-hero{grid-template-columns:1fr;gap:24px}}
.wiki-subgrid{margin-bottom:16px}
.wiki-subgrid .data-card{min-height:88px;padding:16px 18px}
.forum-index-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:12px}
.forum-index-row{display:grid;grid-template-columns:42px minmax(0,1fr) 72px minmax(160px,240px);align-items:center;gap:14px 18px;padding:16px 20px;border-bottom:1px solid var(--vg-border,#e8edf2)}
.forum-index-row:last-child{border-bottom:0}
.forum-index-icon{width:36px;height:36px;border-radius:50%;background:#fff3d6}
.forum-index-main{min-width:0}
.forum-index-count{text-align:center;color:var(--vg-muted,#667085);font-size:12px}
.forum-index-count b{display:block;font-size:16px;color:var(--vg-text,var(--ink))}
.forum-index-last{display:flex;align-items:center;gap:10px;min-width:0}
.forum-index-last div{min-width:0}
.forum-index-last a{display:block;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.forum-index-last small{display:block;color:var(--vg-muted,#667085);font-size:12px}
.forum-index-avatar-fallback{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;background:#f1c40f;color:#3b2a00;font-weight:800;flex:0 0 auto}
@media(max-width:800px){.forum-index-row{grid-template-columns:36px minmax(0,1fr) 64px}.forum-index-last{grid-column:2 / -1}}
@media(max-width:520px){.forum-index-row{grid-template-columns:36px minmax(0,1fr)}.forum-index-count,.forum-index-last{grid-column:2}}
@media(max-width:650px){.forum-section-summary{grid-template-columns:minmax(0,1fr);gap:8px;padding:14px}.forum-section-summary-meta{flex-direction:row;flex-wrap:wrap;gap:10px}}

.section-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.section-subforums{margin:14px 0;padding:10px 14px;border-left:3px solid var(--vg-accent);background:var(--vg-surface-soft);color:var(--vg-muted);font-size:13px}.section-subforums a{color:var(--vg-text);margin-left:8px}.section-subforums a:hover{text-decoration:underline}


.section-subforum-list{margin:18px 0;border:1px solid var(--vg-border);border-radius:10px;background:var(--vg-surface);overflow:hidden}.section-subforum-list h2{margin:0;padding:14px 18px;font-size:15px;border-bottom:1px solid var(--vg-border);background:var(--vg-surface-soft)}.section-subforum-row{display:grid;grid-template-columns:38px minmax(0,1fr) auto;align-items:center;gap:12px;padding:16px 18px;border-bottom:1px solid var(--vg-border);color:var(--vg-text)}.section-subforum-row:last-child{border-bottom:0}.subforum-icon{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;background:#fff4d8;color:var(--vg-accent-strong)}.subforum-name{display:flex;flex-direction:column;gap:4px}.subforum-name small,.subforum-meta{font-size:12px;color:var(--vg-muted)}.section-subforum-row:hover{background:var(--vg-surface-soft)}@media(max-width:650px){.section-subforum-row{grid-template-columns:30px minmax(0,1fr);padding:12px}.subforum-meta{grid-column:2}}


.section-subforum-list{margin:18px 0;border:1px solid var(--vg-border);border-radius:10px;background:var(--vg-surface);overflow:hidden}.section-subforum-list h2{margin:0;padding:14px 18px;font-size:15px;border-bottom:1px solid var(--vg-border);background:var(--vg-surface-soft)}.section-subforum-row{display:grid;grid-template-columns:38px minmax(0,1fr) auto;align-items:center;gap:12px;padding:16px 18px;border-bottom:1px solid var(--vg-border);color:var(--vg-text)}.section-subforum-row:last-child{border-bottom:0}.subforum-icon{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;background:#fff4d8;color:var(--vg-accent-strong)}.subforum-name{display:flex;flex-direction:column;gap:4px}.subforum-name small,.subforum-meta{font-size:12px;color:var(--vg-muted)}.section-subforum-row:hover{background:var(--vg-surface-soft)}@media(max-width:650px){.section-subforum-row{grid-template-columns:30px minmax(0,1fr);padding:12px}.subforum-meta{grid-column:2}}


.field-hint{font-weight:400;color:var(--vg-muted);font-size:12px}.editor-toolbar{max-width:100%;overflow-x:auto;scrollbar-width:thin}.editor-toolbar button,.editor-toolbar select{flex:0 0 auto}


.editor-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:7px;width:100%;max-width:1050px;padding:10px}.editor-toolbar button,.editor-toolbar select{flex:0 0 auto;min-height:38px}.editor-toolbar select{max-width:150px}.editor-toolbar button:nth-of-type(7){margin-left:10px}@media(max-width:900px){.editor-toolbar{max-width:100%;gap:6px}.editor-toolbar button,.editor-toolbar select{min-height:36px}}@media(max-width:560px){.editor-toolbar{gap:5px}.editor-toolbar button,.editor-toolbar select{min-width:36px;padding:7px}.editor-toolbar select{max-width:125px}}

/* Editor toolbar labels and tooltip layer */
.editor-toolbar{position:relative;display:flex;flex-wrap:wrap;gap:8px;padding:10px 12px;align-items:center;overflow:visible}
.editor-toolbar button,.editor-toolbar select{position:relative;flex:0 0 auto;min-width:38px;min-height:38px}
.editor-toolbar button:nth-child(7),.editor-toolbar button:nth-child(13),.editor-toolbar button:nth-child(20),.editor-toolbar button:nth-child(25){margin-left:10px}
.editor-toolbar button[title]::after{content:attr(title);position:absolute;left:50%;top:calc(100% + 7px);transform:translateX(-50%) translateY(-3px);opacity:0;pointer-events:none;z-index:100;color:#fff;background:#17212b;border:1px solid #435669;border-radius:6px;padding:6px 8px;font-size:12px;font-weight:400;line-height:1.2;white-space:nowrap;box-shadow:0 5px 14px #0004;transition:opacity .12s ease,transform .12s ease}
.editor-toolbar button[title]:hover::after,.editor-toolbar button[title]:focus-visible::after{opacity:1;transform:translateX(-50%) translateY(0)}
@media(max-width:650px){.editor-toolbar{gap:6px;padding:8px}.editor-toolbar button,.editor-toolbar select{min-width:36px;min-height:36px}.editor-toolbar button:nth-child(7),.editor-toolbar button:nth-child(13),.editor-toolbar button:nth-child(20),.editor-toolbar button:nth-child(25){margin-left:4px}}
.auth-switcher{display:flex;gap:8px;margin:0 0 14px}.auth-tab{border:1px solid var(--vg-border,#d5dde6);background:var(--vg-surface,#fff);color:inherit;border-radius:8px;padding:10px 18px;cursor:pointer;font-weight:600}.auth-tab.active{background:#e7a400;color:#fff;border-color:#e7a400}.auth-panel{max-width:560px}.auth-panel h2{margin-top:0}.auth-panel[hidden]{display:none}
.forum-login-card{max-width:520px;margin:70px auto;text-align:center;padding:34px}.forum-login-card form{text-align:left}.forum-login-card h1{margin-top:0}.forum-login-card>p{color:var(--vg-muted,#667085)}.forum-login-card button[type=submit]{width:100%;margin-top:8px;background:#e7a400;color:#fff;border:0;border-radius:8px;padding:11px 16px;font-weight:700}.forum-register-link{margin-top:18px;background:transparent;border:0;color:#a66c00;text-decoration:underline;cursor:pointer;font-weight:600}.forum-login-card form[hidden]{display:none}
.auth-page{max-width:820px}.auth-panel{max-width:680px;margin:0 auto;padding:30px 36px}.auth-panel h2{font-size:28px;margin:0 0 4px}.auth-subtitle{margin:0 0 24px;color:var(--vg-muted,#667085)}.auth-inline-link{border:0;background:none;padding:0;color:#9a6800;text-decoration:underline;cursor:pointer;font-size:inherit}.auth-panel form{display:grid;grid-template-columns:190px minmax(0,1fr);gap:12px 18px;align-items:center}.auth-panel form label{font-weight:600;text-align:right}.auth-panel form input:not([type=checkbox]){min-height:42px}.auth-panel form button[type=submit]{grid-column:1/-1;margin-top:12px;min-height:46px}.auth-check{grid-column:1/-1;text-align:left!important;font-weight:400!important;border-top:1px solid var(--vg-border,#d5dde6);padding-top:18px}.auth-check input{margin-right:8px}.required-mark{color:#c62828}.auth-tab{display:none}@media(max-width:650px){.auth-panel{padding:24px 18px}.auth-panel form{grid-template-columns:1fr}.auth-panel form label{text-align:left}.auth-panel form button[type=submit],.auth-check{grid-column:1}.auth-switcher{display:none}}
.auth-panel input:not([type=checkbox]){width:100%;box-sizing:border-box;border:1px solid #c9d3df;border-radius:6px;background:#fff;color:#17202a;padding:11px 13px;font:inherit;transition:border-color .15s,box-shadow .15s}.auth-panel input:not([type=checkbox]):hover{border-color:#a9b8c8}.auth-panel input:not([type=checkbox]):focus{outline:0;border-color:#2185c5;box-shadow:0 0 0 3px rgba(33,133,197,.18)}.auth-panel input::placeholder{color:#8b98a7}.auth-panel label{color:#344454}.auth-panel .login-remember{font-weight:400!important;color:#526274}.auth-panel .login-remember input{accent-color:#2185c5}
.auth-panel .login-remember{display:flex;grid-column:1/-1!important;align-items:center;gap:8px;border-top:1px solid var(--vg-border,#d5dde6);padding-top:18px}.auth-panel .login-remember input[type=checkbox]{width:16px;height:16px;flex:0 0 16px;margin:0}.auth-panel form button[type=submit]{background:linear-gradient(135deg,#f6b719,#e39a00);color:#fff;border:0;border-radius:8px;font-weight:700;cursor:pointer}.auth-panel form button[type=submit]:hover{filter:brightness(1.04);transform:translateY(-1px)}

.top{gap:22px;padding:0 20px;overflow:visible;z-index:40}
.top nav{flex:1;gap:18px;font-size:15px;font-weight:700;letter-spacing:.02em;text-transform:none;align-items:stretch;flex-wrap:nowrap;overflow:visible;height:64px}
.top nav > a,.top nav .nav-item > a{white-space:nowrap;font-size:inherit;font-weight:inherit;letter-spacing:inherit;text-transform:none;display:flex;align-items:center;height:100%;position:relative}
.nav-item{position:relative;display:flex;align-items:center;height:100%}
.nav-item.has-sub:hover > a,.nav-item.has-sub.open > a,.nav-item.has-sub:focus-within > a{color:var(--vg-accent-strong,#b97900)}
.nav-item.has-sub:hover > a::after,.nav-item.has-sub.open > a::after,.nav-item.has-sub:focus-within > a::after{content:"";position:absolute;left:50%;bottom:7px;width:0;height:0;border:5px solid transparent;border-top-color:var(--vg-accent,#e7a400);transform:translateX(-50%)}
.nav-drop{display:none;position:absolute;top:calc(100% - 2px);left:0;min-width:220px;padding:8px 0;background:var(--vg-surface,#fff);border:1px solid var(--vg-border,#dfe6ed);border-radius:10px;box-shadow:0 10px 28px rgba(40,52,65,.12);z-index:50}
.nav-drop::before{content:"";position:absolute;left:0;right:0;top:-10px;height:10px}
.nav-item.has-sub:hover > .nav-drop,.nav-item.has-sub.open > .nav-drop,.nav-item.has-sub:focus-within > .nav-drop{display:flex;flex-direction:column}
.top nav .nav-drop a{color:var(--vg-text,#17202a);font-size:15px;font-weight:600;letter-spacing:0;padding:10px 18px;white-space:nowrap}
.top nav .nav-drop a:hover,.top nav .nav-drop a:focus-visible{color:var(--vg-accent-strong,#b97900);background:var(--vg-surface-soft,#fffaf0)}
@media(max-width:1280px){
  .top{gap:16px;padding:0 16px}
  .top nav{gap:14px}
  .locale{display:none}
}
@media(max-width:980px){
  .top{height:auto;min-height:64px;flex-wrap:wrap;padding:12px 16px;overflow:visible}
  .top nav{order:3;width:100%;height:auto;flex-wrap:wrap;overflow:visible;padding-bottom:2px}
  .top nav > a,.top nav .nav-item > a{height:42px}
  .nav-item{height:42px}
  .locale{display:block}
}

header.top{z-index:40}
main,footer{position:relative;z-index:10}
.anim{width:100%;height:100%;overflow:hidden;position:fixed;top:0;left:0;z-index:1;pointer-events:none}
@media(max-width:1024px){.anim{display:none}}
.anim__smoke{position:absolute}
.anim__smoke.smoke_1{background:url("img/smoke_1.png");background-position:0 50%;width:100%;height:671px;top:-300px;animation:smoke-1 14s linear infinite;opacity:1}
@keyframes smoke-1{from{background-position:0 50%}to{background-position:1166px 50%}}
.anim__smoke.smoke_2{background:url("img/smoke_2.png");background-position:0 50%;width:100%;height:558px;left:0;top:-300px;animation:smoke-2 10s linear infinite;opacity:1}
@keyframes smoke-2{from{background-position:0 50%}to{background-position:914px 50%}}
.anim__smoke.smoke_3{background:url("img/smoke_1.png");background-position:0 50%;width:100%;height:671px;bottom:-100px;animation:smoke-3 18s linear infinite;opacity:1;z-index:1}
@keyframes smoke-3{from{background-position:0 50%}to{background-position:1166px 50%}}
.anim__smoke.smoke_4{background:url("img/smoke_2.png");background-position:0 50%;width:100%;height:558px;left:0;bottom:-200px;animation:smoke-4 14s linear infinite;opacity:1;z-index:1}
@keyframes smoke-4{from{background-position:0 50%}to{background-position:914px 50%}}
.anim__sparks{position:absolute;z-index:6}
.anim__sparks.right{top:400px;right:-100px;transform:rotate(135deg) scale(-1.8,-1.8)}
.anim__sparks.left{top:400px;left:-100px;transform:rotate(-135deg) scale(1.8,-1.8)}
.anim__sparks div{position:absolute}
.anim__sparks-spark-1{background:url("img/spark_1.png") no-repeat;width:764px;height:313px;right:0;bottom:-120px;transform:scale(.6);animation:spark-1 4s linear infinite}
@keyframes spark-1{0%{bottom:-320px;transform:scale(.6);opacity:1}25%{bottom:-240px;transform:scale(.7);opacity:1}50%{bottom:-160px;transform:scale(.8);opacity:1}75%{bottom:-80px;transform:scale(.9);opacity:.5}to{bottom:0;transform:scale(1);opacity:0}}
.anim__sparks-spark-2{background:url("img/spark_2.png") no-repeat;width:149px;height:335px;right:230px;bottom:-320px;transform:scale(.6);animation:spark-1 4s linear infinite;animation-delay:2s}
.anim__sparks-spark-3{background:url("img/spark_3.png") no-repeat;width:128px;height:165px;right:280px;bottom:-140px;transform:scale(.6);animation:spark-3 4s linear infinite;animation-delay:2s}
@keyframes spark-3{0%{bottom:-140px;transform:scale(.6);opacity:1}25%{bottom:-80px;transform:scale(.7);opacity:1}50%{bottom:-20px;transform:scale(.8);opacity:1}75%{bottom:40px;transform:scale(.9);opacity:.5}to{bottom:100px;transform:scale(1);opacity:0}}
.anim__sparks-spark-4{background:url("img/spark_4.png") no-repeat;width:794px;height:176px;right:0;bottom:-180px;transform:scale(.6);animation:spark-4 4s linear infinite}
@keyframes spark-4{0%{bottom:-180px;transform:scale(.6);opacity:1}25%{bottom:-120px;transform:scale(.7);opacity:1}50%{bottom:-60px;transform:scale(.8);opacity:1}75%{bottom:0;transform:scale(.9);opacity:.5}to{bottom:60px;transform:scale(1);opacity:0}}
.circles{display:none}
.circles li{position:absolute;display:block;width:20px;height:20px;background:rgba(255,255,255,.2);animation:esendia-float 25s linear infinite;bottom:-150px}
.circles li:nth-child(1){left:25%;width:80px;height:80px;animation-delay:0s}
.circles li:nth-child(2){left:10%;width:20px;height:20px;animation-delay:2s;animation-duration:12s}
.circles li:nth-child(3){left:70%;width:20px;height:20px;animation-delay:4s}
.circles li:nth-child(4){left:40%;width:60px;height:60px;animation-delay:0s;animation-duration:18s}
.circles li:nth-child(5){left:65%;width:20px;height:20px;animation-delay:0s}
.circles li:nth-child(6){left:75%;width:110px;height:110px;animation-delay:3s}
.circles li:nth-child(7){left:35%;width:150px;height:150px;animation-delay:7s}
.circles li:nth-child(8){left:50%;width:25px;height:25px;animation-delay:15s;animation-duration:45s}
.circles li:nth-child(9){left:20%;width:15px;height:15px;animation-delay:2s;animation-duration:35s}
.circles li:nth-child(10){left:85%;width:150px;height:150px;animation-delay:0s;animation-duration:11s}
@keyframes esendia-float{0%{transform:translateY(0) rotate(0deg);opacity:1;border-radius:0}100%{transform:translateY(-1000px) rotate(720deg);opacity:0;border-radius:50%}}

.wiki-theme-toggle{margin-left:auto;flex:0 0 36px;width:36px;height:36px;border-radius:50%;border:1px solid var(--vg-border);background:var(--vg-surface-soft);color:var(--vg-text);cursor:pointer;font-size:16px;line-height:1}
.wiki-theme-toggle:hover{border-color:var(--vg-accent);color:var(--vg-accent-strong)}
header.top .locale{margin-left:10px}
.wiki-theme-toggle-float{position:fixed;top:16px;right:16px;z-index:60;margin-left:0}
html.theme-dark body,body.theme-dark{background:var(--vg-bg);color:var(--vg-text)}
html.theme-dark main,body.theme-dark main{background:var(--vg-surface);box-shadow:0 8px 28px rgba(0,0,0,.28)}
html.theme-dark .top,body.theme-dark .top{background:var(--vg-surface);color:var(--vg-text);box-shadow:0 1px 10px rgba(0,0,0,.35)}
html.theme-dark .brand span,body.theme-dark .brand span{color:var(--vg-text)}
html.theme-dark .locale,body.theme-dark .locale,html.theme-dark footer,body.theme-dark footer{color:var(--vg-muted)}
html.theme-dark .crumb,body.theme-dark .crumb,html.theme-dark .intro p,body.theme-dark .intro p,html.theme-dark .home-hero-copy p,body.theme-dark .home-hero-copy p{color:var(--vg-muted)}
html.theme-dark .block-head,body.theme-dark .block-head{border-color:var(--vg-border)}
html.theme-dark .home-search,body.theme-dark .home-search,html.theme-dark .search,body.theme-dark .search{background:var(--vg-surface-soft);border-color:var(--vg-accent)}
html.theme-dark .home-search input,body.theme-dark .home-search input,html.theme-dark .search input,body.theme-dark .search input{color:var(--vg-text)}
html.theme-dark .home-search input::placeholder,body.theme-dark .home-search input::placeholder,html.theme-dark .search input::placeholder,body.theme-dark .search input::placeholder{color:var(--vg-muted)}
html.theme-dark .news-feed-item,body.theme-dark .news-feed-item{border-color:var(--vg-border)}
html.theme-dark .news-feed-item p,body.theme-dark .news-feed-item p,html.theme-dark .news-feed-item time,body.theme-dark .news-feed-item time,html.theme-dark .home-data .data-card small,body.theme-dark .home-data .data-card small{color:var(--vg-muted)}
html.theme-dark .data-card,body.theme-dark .data-card,html.theme-dark .article-card,body.theme-dark .article-card{background:var(--vg-surface);border-color:var(--vg-border);color:var(--vg-text)}
html.theme-dark .nav-drop,body.theme-dark .nav-drop{background:var(--vg-surface);border-color:var(--vg-border);box-shadow:0 12px 28px rgba(0,0,0,.4)}
html.theme-dark .top nav .nav-drop a,body.theme-dark .top nav .nav-drop a{color:var(--vg-text)}
html.theme-dark .top nav .nav-drop a:hover,body.theme-dark .top nav .nav-drop a:hover{background:var(--vg-surface-soft);color:var(--vg-accent-strong)}
html.theme-dark .circles li,body.theme-dark .circles li{background:rgba(245,181,27,.12)}
html.theme-dark input,html.theme-dark textarea,html.theme-dark select,body.theme-dark input,body.theme-dark textarea,body.theme-dark select{background:var(--vg-surface-soft);color:var(--vg-text);border-color:var(--vg-border)}
html.theme-dark a.forum-action,body.theme-dark a.forum-action{color:var(--vg-accent-strong)}

.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.anim,.circles{display:none!important}
@media (prefers-reduced-motion:reduce){
  .anim,.circles{display:none!important}
  *,*::before,*::after{animation:none!important;transition:none!important}
}
html{--theme-ease:560ms cubic-bezier(.22,1,.36,1);background:var(--color-bg)}
html.theme-ready body,html.theme-ready .top,html.theme-ready main,html.theme-ready footer,html.theme-ready .icon-card,html.theme-ready .cat-card,html.theme-ready .home-loc,html.theme-ready .home-event,html.theme-ready .home-article,html.theme-ready .home-feature,html.theme-ready .news-feat,html.theme-ready .block-head,html.theme-ready input,html.theme-ready button,html.theme-ready a,html.theme-ready h1,html.theme-ready h2,html.theme-ready h3,html.theme-ready p,html.theme-ready small,html.theme-ready strong,html.theme-ready .home-cinematic,html.theme-ready .home-search,html.theme-ready .site-footer,html.theme-ready .nav-drop,html.theme-ready .brand-laurel,html.theme-ready .icon-card-ico{
  transition:background-color var(--theme-ease),color var(--theme-ease),border-color var(--theme-ease),box-shadow var(--theme-ease),opacity var(--theme-ease);
}
body{font-family:var(--font-ui);background:var(--color-bg);color:var(--color-text)}
main{max-width:var(--container-width);background:var(--color-surface);color:var(--color-text);box-shadow:var(--shadow-md)}
.top{
  height:64px;padding:0 max(var(--page-pad),calc(50vw - var(--container-width) / 2));gap:24px;background:var(--color-bg-elevated);color:var(--color-text);
  border-bottom:1px solid var(--color-border);box-shadow:none;z-index:40;
}
.brand{font-family:var(--font-editorial);font-size:18px;font-weight:600;letter-spacing:.14em;text-transform:uppercase;color:var(--color-text);line-height:1.05;display:flex;flex-direction:column;gap:2px}
.brand span,.brand small{font-family:var(--font-ui);font-size:9px;letter-spacing:.28em;color:var(--color-accent);font-weight:600;margin-left:0}
.brand-compact,.brand-full{flex-direction:row;align-items:center;gap:8px}
.brand-copy{display:flex;flex-direction:column;gap:2px;line-height:1.05}
.brand-laurel{width:32px;height:32px;object-fit:cover;border-radius:50%;flex:0 0 auto;display:block}
.brand-full .brand-laurel{width:40px;height:40px}
.top nav{height:64px;gap:20px;font-family:var(--font-ui);font-size:13px;font-weight:500;letter-spacing:.06em;text-transform:uppercase;color:var(--color-text-muted)}
.top nav > a,.top nav .nav-item > a{position:relative}
.top nav > a:hover,.top nav .nav-item > a:hover,.top nav .nav-item.has-sub:hover > a{color:var(--color-text)}
.top nav > a::after,.top nav .nav-item > a::after{content:"";position:absolute;left:0;right:0;bottom:10px;height:1px;background:var(--color-accent);transform:scaleX(0);transition:transform var(--transition-fast)}
.top nav > a:hover::after,.top nav .nav-item:hover > a::after,.top nav .nav-item.has-sub.open > a::after{transform:scaleX(1)}
.nav-item.has-sub:hover > a::after,.nav-item.has-sub.open > a::after,.nav-item.has-sub:focus-within > a::after{border:0;width:auto;height:1px;background:var(--color-accent);bottom:10px;left:0;right:0;transform:scaleX(1)}
.nav-drop{min-width:200px;padding:8px 0;background:var(--color-surface);border:1px solid var(--color-border);border-radius:var(--radius-sm);box-shadow:var(--shadow-md)}
.top nav .nav-drop a{color:var(--color-text);font-size:14px;font-weight:500;letter-spacing:0;text-transform:none;padding:8px 16px}
.top nav .nav-drop a:hover{background:var(--color-surface-hover);color:var(--color-accent-hover)}
.header-search{display:flex;align-items:center;height:36px;min-width:180px;max-width:240px;border:1px solid var(--color-border);border-radius:var(--radius-sm);background:var(--color-surface-2)}
.header-search input{flex:1;min-width:0;border:0;background:transparent;color:var(--color-text);padding:0 10px;font:inherit;font-size:13px;outline:0}
.header-search button{width:36px;border:0;background:transparent;color:var(--color-text-muted);cursor:pointer}
.header-search button:hover{color:var(--color-accent)}
.theme-switch{position:relative;margin-left:0}
.theme-switch-btn{width:36px;height:36px;border:1px solid var(--color-border);border-radius:var(--radius-sm);background:transparent;color:var(--color-text);cursor:pointer}
.theme-switch-btn:hover,.theme-switch-btn[aria-expanded="true"]{border-color:var(--color-accent);color:var(--color-accent)}
.theme-switch-menu{position:absolute;right:0;top:calc(100% + 6px);min-width:140px;padding:6px 0;background:var(--color-surface);border:1px solid var(--color-border);border-radius:var(--radius-sm);box-shadow:var(--shadow-md);z-index:60}
.theme-switch-menu button{display:block;width:100%;text-align:left;padding:8px 14px;border:0;background:transparent;color:var(--color-text);font:inherit;font-size:13px;cursor:pointer}
.theme-switch-menu button:hover,.theme-switch-menu button[aria-pressed="true"]{background:var(--color-surface-hover);color:var(--color-accent)}
.theme-switch-float{position:fixed;top:16px;right:16px;z-index:60}
header.top .locale{margin-left:4px;font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--color-text-muted)}
.home-catalog{margin:48px 0 32px}
.home-catalog-head{display:flex;flex-direction:column;gap:8px;margin-bottom:24px}
.meta-label{margin:0;font-size:11px;letter-spacing:.22em;text-transform:uppercase;color:var(--color-accent)}
.home-catalog-head h2{margin:0;font-family:var(--font-editorial);font-size:var(--heading-md);font-weight:600;letter-spacing:.02em;color:var(--color-text)}
.home-data{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;width:100%;max-width:none;margin:0}
.cat-card{display:flex;flex-direction:column;justify-content:flex-end;min-height:180px;padding:16px;border:1px solid var(--color-border);border-radius:var(--radius-sm);background:var(--color-surface-2);color:var(--color-text);transition:border-color var(--transition-fast),background-color var(--transition-fast),transform var(--transition-fast)}
.cat-card:hover{border-color:var(--color-border-strong);background:var(--color-surface-hover);transform:translateY(-2px)}
.cat-card-num{font-size:11px;letter-spacing:.18em;color:var(--color-accent);margin-bottom:12px}
.cat-card strong{font-family:var(--font-editorial);font-size:22px;font-weight:600;letter-spacing:.04em;text-transform:uppercase}
.cat-card small{margin-top:6px;color:var(--color-text-muted);font-size:13px;line-height:1.45}
.cat-card-go{margin-top:16px;color:var(--color-accent);transition:transform var(--transition-fast)}
.cat-card:hover .cat-card-go{transform:translateX(4px)}
.home-hero-copy h1,.intro h1{font-family:var(--font-editorial);font-weight:600}
@media(max-width:1024px){.home-data{grid-template-columns:repeat(2,minmax(0,1fr))}.header-search{min-width:140px;max-width:180px}}
@media(max-width:650px){
  .home-data{grid-template-columns:1fr}
  .cat-card{min-height:0;padding:14px}
  .header-search{order:4;width:100%;max-width:none;min-width:0}
  .theme-switch{margin-left:auto}
}

/* Homepage cinematic layout — container matches current wiki width */
.btn-primary,.btn-secondary{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  min-height:40px;padding:0 16px;border-radius:var(--radius-sm);
  font-family:var(--font-ui);font-size:12px;font-weight:600;letter-spacing:.12em;text-transform:uppercase;
  transition:background-color var(--transition-fast),border-color var(--transition-fast),color var(--transition-fast);
}
.btn-primary{background:var(--color-accent);color:#1a140c;border:1px solid var(--color-accent)}
.btn-primary:hover,.btn-primary:focus-visible{background:var(--color-accent-hover);border-color:var(--color-accent-hover);color:#1a140c}
.btn-secondary{background:transparent;color:var(--color-text);border:1px solid var(--color-border-strong)}
.btn-secondary:hover,.btn-secondary:focus-visible{border-color:var(--color-accent);color:var(--color-accent)}
.btn-primary:focus-visible,.btn-secondary:focus-visible{outline:2px solid var(--color-accent);outline-offset:3px}

body.home-page{background:var(--color-bg);color:var(--color-text)}
body.home-page .top{
  display:block;height:auto;padding:0;
  background:var(--color-bg-elevated);
}
body.home-page .top-inner{
  display:flex;align-items:center;gap:20px;height:64px;
  width:min(calc(100% - 2 * var(--page-pad)),var(--container-width));
  margin-inline:auto;
}
body.home-page main.home-main{
  width:min(calc(100% - 2 * var(--page-pad)),var(--container-width));
  max-width:none;margin:0 auto;padding:48px 0 64px;
  background:transparent;border:0;border-radius:0;box-shadow:none;min-height:0;
}

.home-cinematic{
  position:relative;min-height:520px;display:flex;align-items:center;
  overflow:hidden;background:var(--color-bg);color:var(--color-text);
}
.home-cinematic-art{
  position:absolute;inset:0;
  background-position:right center;background-size:cover;background-repeat:no-repeat;
  opacity:0;transition:opacity 560ms cubic-bezier(.22,1,.36,1);
}
.home-cinematic-art.art-light{background-image:url("img/hero-light.jpg?v=3");opacity:1}
.home-cinematic-art.art-dark{background-image:url("img/hero-dark.jpg?v=3")}
html[data-theme="dark"] .home-cinematic-art.art-light{opacity:0}
html[data-theme="dark"] .home-cinematic-art.art-dark{opacity:1}
.home-cinematic-art::after{
  content:"";position:absolute;inset:0;
  background:linear-gradient(90deg,var(--color-bg) 0%,color-mix(in srgb,var(--color-bg) 92%,transparent) 28%,color-mix(in srgb,var(--color-bg) 35%,transparent) 58%,transparent 82%);
}
.home-cinematic-inner{
  position:relative;z-index:2;
  width:min(calc(100% - 2 * var(--page-pad)),var(--container-width));
  margin-inline:auto;padding:56px 0 48px;
}
.home-cinematic-kicker{
  margin:0 0 12px;max-width:36rem;font-size:11px;line-height:1.6;letter-spacing:.22em;text-transform:uppercase;color:var(--color-accent);
}
.home-cinematic h1{
  margin:0 0 8px;max-width:20ch;font-family:var(--font-editorial);font-size:clamp(40px,4.6vw,64px);
  font-weight:600;letter-spacing:.04em;line-height:.95;color:var(--color-text);
}
.home-cinematic-tag{
  margin:0 0 12px;font-size:13px;letter-spacing:.16em;text-transform:uppercase;color:var(--color-accent);
}
.home-cinematic-lead{
  margin:0 0 24px;max-width:42ch;font-size:var(--text-md);line-height:1.6;color:var(--color-text-muted);
}
.home-cinematic-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:16px}
.home-cinematic .home-search{display:flex;height:44px;max-width:420px;margin:18px 0 0;border:1px solid var(--color-border-strong);border-radius:var(--radius-sm);background:color-mix(in srgb,var(--color-bg) 72%,transparent)}
.home-cinematic .home-search input{flex:1;min-width:0;border:0;background:transparent;color:var(--color-text);padding:0 14px;font:inherit;outline:0}
.home-cinematic .home-search button{width:44px;border:0;background:transparent;color:var(--color-accent);font-size:18px;cursor:pointer}

.home-catalog{margin:0 0 40px}
.home-catalog-head{display:grid;grid-template-columns:1fr auto;grid-template-rows:auto auto;gap:4px 24px;align-items:end;margin-bottom:16px}
.home-catalog-head .meta-label{grid-column:1}
.home-catalog-head h2{grid-column:1;font-size:var(--heading-sm)}
#data{scroll-margin-top:80px}
.home-catalog-more{grid-column:2;grid-row:1 / span 2;align-self:center;font-size:13px;letter-spacing:.06em;color:var(--color-accent)}
.home-catalog-more:hover{color:var(--color-accent-hover)}
.home-data{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px}
.icon-card{
  display:flex;flex-direction:column;align-items:flex-start;gap:8px;
  min-height:0;padding:16px;
  background:var(--color-surface);border:1px solid var(--color-border);border-radius:var(--radius-sm);
  color:var(--color-text);transition:border-color var(--transition-fast),transform var(--transition-fast),background-color 320ms ease,color 320ms ease;
}
.icon-card:hover{border-color:var(--color-border-strong);transform:translateY(-1px)}
.icon-card-ico{display:grid;place-items:center;width:32px;height:32px;color:var(--color-accent)}
.icon-card-ico svg{width:24px;height:24px}
.icon-card strong{font-family:var(--font-ui);font-size:14px;font-weight:600;letter-spacing:.02em}
.icon-card small{color:var(--color-text-muted);font-size:12px;line-height:1.35}
.cat-card{
  display:flex;flex-direction:column;justify-content:flex-start;
  min-height:0;padding:0 0 12px;overflow:hidden;
  background:var(--color-surface);border:1px solid var(--color-border);border-radius:var(--radius-sm);
}
.cat-card:hover{transform:translateY(-1px)}
.cat-card-art{display:block;width:100%;aspect-ratio:3/2;overflow:hidden;margin:0 0 10px;background:var(--color-surface-2)}
.cat-card-art img{width:100%;height:100%;object-fit:cover;object-position:center;display:block;transition:transform var(--transition-normal)}
.cat-card:hover .cat-card-art img{transform:scale(1.03)}
.cat-card-num,.cat-card strong,.cat-card small,.cat-card-go{padding-left:12px;padding-right:12px}
.cat-card-num{margin:0 0 4px;font-size:10px;letter-spacing:.16em}
.cat-card strong{font-family:var(--font-ui);font-size:13px;font-weight:700;letter-spacing:.02em;text-transform:none;line-height:1.25}
.cat-card small{margin-top:4px;font-size:12px;line-height:1.35}
.cat-card-go{margin-top:auto;padding-top:10px;font-size:14px}

.home-trio{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr) minmax(0,1fr);gap:24px;margin:8px 0 40px;align-items:start}
.home-trio-col .block-head{margin:0 0 12px;padding-bottom:8px}
.home-trio-col h2{font-size:20px}
.news-mag-grid{display:grid;gap:0}
.news-feat{
  position:relative;min-height:200px;display:flex;align-items:flex-end;overflow:hidden;
  border:1px solid var(--color-border);border-radius:var(--radius-sm);color:#f3efe6;margin-bottom:8px;
}
.news-feat img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.news-feat-copy{
  position:relative;z-index:1;width:100%;padding:16px;
  background:linear-gradient(180deg,transparent,rgba(9,11,14,.88));
}
.news-feat-copy time,.news-side-item time,.home-list-item time{display:block;font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--color-accent);margin-bottom:4px}
.news-feat-copy h3{margin:0 0 6px;font-family:var(--font-editorial);font-size:22px;font-weight:600;line-height:1.15}
.news-feat-copy p{margin:0;font-size:13px;line-height:1.45;color:rgba(247,245,240,.82);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.news-side-item{display:block;padding:10px 0;border-bottom:1px solid var(--color-border);color:var(--color-text)}
.news-side-item h3,.home-list-item h3{margin:0;font-family:var(--font-ui);font-size:14px;font-weight:600;line-height:1.35}
.news-side-item:hover h3,.home-list-item:hover h3{color:var(--color-accent)}
.home-list-item{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid var(--color-border);color:var(--color-text)}
.home-list-item span{color:var(--color-accent);flex:0 0 auto}
.home-guide{display:grid;grid-template-columns:88px minmax(0,1fr);gap:10px;padding:8px 0;border-bottom:1px solid var(--color-border);color:var(--color-text)}
.home-guide img{width:88px;height:64px;object-fit:cover;border-radius:var(--radius-sm);background:var(--color-surface-2)}
.home-guide span{display:block;font-size:11px;letter-spacing:.14em;text-transform:uppercase;color:var(--color-accent);margin-bottom:4px}
.home-guide h3{margin:0 0 4px;font-family:var(--font-editorial);font-size:18px;font-weight:600;line-height:1.2}
.home-guide p{margin:0;font-size:12px;line-height:1.4;color:var(--color-text-muted);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.home-guide:hover h3{color:var(--color-accent)}
.home-trio .empty-state{min-height:120px;padding:20px}

body.home-page .block{margin:40px 0}
body.home-page .block-head{border-bottom:1px solid var(--color-border);margin-bottom:12px;padding-bottom:10px}
body.home-page .block h2{font-family:var(--font-editorial);font-size:var(--heading-sm);font-weight:600;letter-spacing:.02em;margin:0}
body.home-page .block-head a{font-size:13px;letter-spacing:.04em;color:var(--color-accent)}
.home-wiki-block .empty-state{min-height:120px;padding:24px}
.home-wiki-block .block-head{margin-bottom:0}
.home-sublinks{
  display:flex;flex-wrap:wrap;align-items:stretch;gap:0 20px;height:42px;
  margin:0 0 16px;border-bottom:1px solid var(--color-border);
  font-family:var(--font-ui);font-size:13px;font-weight:500;letter-spacing:.06em;text-transform:uppercase;
}
.home-sublinks a{
  position:relative;display:flex;align-items:center;height:100%;
  color:var(--color-text-muted);white-space:nowrap;
}
.home-sublinks a::after{
  content:"";position:absolute;left:0;right:0;bottom:10px;height:1px;
  background:var(--color-accent);transform:scaleX(0);transition:transform var(--transition-fast);
}
.home-sublinks a:hover,.home-sublinks a:focus-visible{color:var(--color-text)}
.home-sublinks a:hover::after,.home-sublinks a:focus-visible::after{transform:scaleX(1)}
.home-topic-list{display:grid;gap:12px}
.home-topic-list.is-mechanics{grid-template-columns:minmax(0,1.35fr) minmax(0,.85fr);align-items:stretch}
.home-feature{
  position:relative;min-height:260px;display:flex;align-items:flex-end;overflow:hidden;
  border:1px solid var(--color-border);border-radius:var(--radius-sm);color:#f3efe6;
}
.home-feature img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.home-feature-copy{position:relative;z-index:1;width:100%;padding:20px;background:linear-gradient(180deg,transparent,rgba(9,11,14,.88))}
.home-feature-copy span,.home-loc span,.home-article span,.home-event b{display:block;font-size:11px;letter-spacing:.14em;text-transform:uppercase;color:var(--color-accent);margin-bottom:6px;font-weight:600}
.home-feature-copy h3{margin:0 0 6px;font-family:var(--font-editorial);font-size:28px;font-weight:600;line-height:1.15}
.home-feature-copy p,.home-article p{margin:0 0 10px;font-size:14px;line-height:1.5;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.home-feature-copy em{font-style:normal;font-size:12px;letter-spacing:.06em;text-transform:uppercase;color:var(--color-accent-soft)}
.home-topic-list.is-locations{grid-template-columns:repeat(2,minmax(0,1fr))}
.home-loc{display:flex;flex-direction:column;border:1px solid var(--color-border);border-radius:var(--radius-sm);overflow:hidden;background:var(--color-surface);color:var(--color-text)}
.home-loc img{width:100%;aspect-ratio:16/9;object-fit:cover;display:block}
.home-loc span,.home-loc strong,.home-loc small{padding-left:14px;padding-right:14px}
.home-loc span{margin-top:12px}
.home-loc strong{font-family:var(--font-editorial);font-size:22px;font-weight:600;margin:4px 0}
.home-loc small{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;padding-bottom:14px;color:var(--color-text-muted)}
.home-topic-list.is-events{grid-template-columns:1fr}
.home-event{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 24px;padding:16px 0;border-bottom:1px solid var(--color-border);color:var(--color-text)}
.home-event b{justify-self:start;padding:3px 8px;border:1px solid var(--color-border);border-radius:var(--radius-sm);margin-bottom:2px}
.home-event h3{grid-column:1;margin:0;font-family:var(--font-editorial);font-size:22px;font-weight:600}
.home-event p{grid-column:1;margin:0;color:var(--color-text-muted);font-size:14px;line-height:1.5}
.home-event time{grid-column:2;grid-row:1 / span 3;font-size:12px;color:var(--color-text-muted)}
.home-topic-list.is-articles{grid-template-columns:repeat(2,minmax(0,1fr))}
.home-article{display:grid;grid-template-columns:160px minmax(0,1fr);gap:16px;align-items:center;color:var(--color-text)}
.home-article img{width:160px;height:108px;object-fit:cover;border-radius:var(--radius-sm)}
.home-article h3{margin:0 0 6px;font-family:var(--font-editorial);font-size:22px;font-weight:600;line-height:1.2}
.home-article time{font-size:12px;letter-spacing:.06em;text-transform:uppercase;color:var(--color-accent)}
.home-loc:hover,.home-article:hover h3,.home-event:hover h3,.home-feature:hover{color:var(--color-accent)}
@media(max-width:1100px){
  .home-data{grid-template-columns:repeat(3,minmax(0,1fr))}
  .home-topic-list.is-mechanics,.home-topic-list.is-locations,.home-topic-list.is-articles{grid-template-columns:1fr}
}
@media(max-width:800px){
  .home-sublinks{height:auto;gap:0 16px}
  .home-sublinks a{height:42px}
  .home-data{grid-template-columns:repeat(2,minmax(0,1fr))}
  .home-article{grid-template-columns:96px minmax(0,1fr)}
  .home-article img{width:96px;height:72px}
  .home-event{grid-template-columns:1fr}
  .home-event time{grid-column:1;grid-row:auto}
}

.home-rule{display:flex;align-items:center;gap:16px;margin:8px 0 32px}
.home-rule::before,.home-rule::after{content:"";flex:1;height:1px;background:var(--color-border)}
.home-rule img{width:22px;height:22px;object-fit:cover;border-radius:50%;opacity:.8}
body.wiki-page{background:var(--color-bg);color:var(--color-text)}
body.wiki-page header.top{display:block;height:auto;padding:0;background:var(--color-bg-elevated)}
body.wiki-page .top-inner{display:flex;align-items:center;gap:20px;height:64px;width:min(calc(100% - 2 * var(--page-pad)),var(--container-width));margin-inline:auto;overflow:visible}
body.wiki-page main,body.wiki-page main#section{
  width:min(calc(100% - 2 * var(--page-pad)),var(--container-width));
  margin:0 auto;padding:36px 0 72px;background:transparent;border:0;box-shadow:none;border-radius:0;min-height:0;
}
body.wiki-page .intro h1{font-family:var(--font-editorial);font-weight:600;letter-spacing:.02em;margin:8px 0 12px}
body.wiki-page .crumb{color:var(--color-text-muted);margin-bottom:20px;font-size:13px}
body.wiki-page .crumb a{color:var(--color-accent)}
body.wiki-page .search{border-color:var(--color-accent)}

.site-footer{background:var(--color-bg-elevated);border-top:1px solid var(--color-border);padding:32px 0;text-align:left;color:var(--color-text-muted)}
.site-footer-inner{
  width:min(calc(100% - 2 * var(--page-pad)),var(--container-width));
  margin:0 auto;display:grid;gap:12px;
}
.site-footer .brand{width:max-content}
.site-footer p{margin:0;font-size:13px}
.site-footer nav{display:flex;flex-wrap:wrap;gap:12px 20px}
.site-footer nav a{font-size:13px;letter-spacing:.04em;color:var(--color-text-muted)}
.site-footer nav a:hover{color:var(--color-accent)}

@media(max-width:1100px){
  .home-data{grid-template-columns:repeat(3,minmax(0,1fr))}
  .home-trio{grid-template-columns:1fr;gap:28px}
}
@media(max-width:800px){
  .home-cinematic{min-height:480px;align-items:flex-end}
  .home-cinematic-inner{padding:40px 0 32px}
  .home-cinematic-art{background-position:center top}
  .home-cinematic-art::after{
    background:linear-gradient(180deg,color-mix(in srgb,var(--color-bg) 18%,transparent) 0%,var(--color-bg) 78%);
  }
  .home-catalog-head{grid-template-columns:1fr}
  .home-catalog-more{grid-column:1;grid-row:auto}
  .home-data{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:650px){
  body.home-page .top-inner{height:auto;min-height:64px;flex-wrap:wrap;padding:8px 0}
  .home-data{grid-template-columns:1fr}
  .home-cinematic-actions{flex-direction:column;align-items:stretch}
  .btn-primary,.btn-secondary{width:100%}
}
