[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 Gold design tokens */
:root{--vg-bg:#eef2f6;--vg-surface:#fff;--vg-surface-soft:#fffaf0;--vg-text:#17202a;--vg-muted:#64748b;--vg-border:#dfe6ed;--vg-accent:#e7a400;--vg-accent-strong:#b97900;--vg-success:#2f9b61;--vg-danger:#d74b4b;--vg-radius:10px;--vg-control-radius:8px;--vg-focus:#1d78c1}
.theme-dark{--vg-bg:#17212b;--vg-surface:#202c38;--vg-surface-soft:#263746;--vg-text:#e8edf3;--vg-muted:#b9c2cc;--vg-border:#40505e;--vg-accent:#f5b51b;--vg-accent-strong:#ffd36a}
/* 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,1.15fr) minmax(280px,.9fr);gap:36px 48px;align-items:start;margin:8px 0 28px}
.home-hero-copy{max-width:640px}
.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.6;color:#666;margin:0 0 22px}
.home-search{display:flex;height:48px;border:2px solid var(--gold);border-radius:6px;max-width:520px}
.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;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;max-width:520px}
.home-data .data-card{min-height:0;padding:10px 12px;gap:2px}
.home-data .data-card b{font-size:13px;line-height:1}
.home-data .data-card strong{font-size:13px;line-height:1.25}
.home-data .data-card small{font-size:11px;color:#888;line-height:1.3}
.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:#e5a600}
.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:#e5a600;transform:translateX(-50%)}
.nav-drop{display:none;position:absolute;top:100%;left:0;min-width:220px;padding:10px 0 8px;background:#1b1438;box-shadow:0 14px 28px rgba(12,8,28,.35);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:#f4f1fb;font-size:15px;font-weight:600;letter-spacing:0;padding:11px 24px;white-space:nowrap}
.top nav .nav-drop a:hover,.top nav .nav-drop a:focus-visible{color:#f5ae08;background:rgba(255,255,255,.06)}
@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;margin-left:auto}
}
