:root {
    --bg: #090b0d;
    --panel: rgba(13, 15, 16, .94);
    --panel-soft: rgba(19, 21, 22, .9);
    --paper: #fffaf0;
    --text: #f5eddf;
    --muted: #bdb4a7;
    --ink: #241e18;
    --gold: #d9ab50;
    --gold-light: #f3d78f;
    --gold-dark: #896323;
    --red: #a91f19;
    --red-dark: #62100f;
    --line: rgba(219, 174, 84, .35);
    --shadow: 0 18px 55px rgba(0, 0, 0, .42);
}

* { box-sizing: border-box; }
html {
    min-height: 100%;
    scroll-behavior: smooth;
    background: var(--bg);
}
body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background:
        linear-gradient(180deg, rgba(5, 7, 8, .22) 0%, rgba(5, 7, 8, .48) 55%, rgba(5, 7, 8, .82) 100%),
        url('site-bg.jpg') center top / cover fixed no-repeat,
        var(--bg);
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    text-rendering: optimizeLegibility;
    font-kerning: normal;
    font-synthesis: none;
}
button, input, select, textarea { font: inherit; }
a { color: inherit; }
img { display: block; max-width: 100%; }
.container { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }

.site-header {
    position: sticky;
    z-index: 30;
    top: 0;
    color: #fff;
    background: linear-gradient(180deg, rgba(48, 23, 13, .97), rgba(15, 11, 9, .97));
    border-bottom: 2px solid #a87828;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .3);
    backdrop-filter: blur(12px);
}
.header-glow {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}
.header-glow::after {
    position: absolute;
    top: -100px;
    right: 8%;
    width: 330px;
    height: 180px;
    content: "";
    background: radial-gradient(circle, rgba(224, 174, 75, .18), transparent 68%);
}
.header-inner {
    position: relative;
    display: flex;
    min-height: 82px;
    align-items: center;
    justify-content: space-between;
    gap: 26px;
}
.brand {
    display: grid;
    flex: 0 0 auto;
    text-decoration: none;
    line-height: 1.1;
}
.brand-mark {
    color: var(--gold);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .25em;
}
.brand strong {
    margin-top: 4px;
    color: #fff;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: .02em;
}
.brand small {
    margin-top: 5px;
    color: #aaa398;
    font-size: 11px;
}
.main-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: wrap;
}
.main-nav a {
    padding: 9px 12px;
    color: #e9e1d4;
    border: 1px solid transparent;
    border-radius: 0;
    font-size: 13px;
    font-weight: 750;
    text-decoration: none;
    transition: color .2s, background .2s, border-color .2s, transform .2s;
}
.main-nav a:hover {
    color: var(--gold-light);
    background: rgba(255, 255, 255, .06);
    border-color: rgba(219, 174, 84, .25);
    transform: translateY(-1px);
}
.main-nav .install-link { color: var(--gold-light); border-color: var(--line); }
.main-nav .community-link { color: #dce9f7; background: rgba(66, 86, 110, .38); }
.main-nav .register-link {
    color: #281805;
    background: linear-gradient(180deg, #f2d27e, #c58a2c);
    border-color: #f4d88b;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .25);
}
.main-nav .register-link:hover { color: #281805; background: #f2cf78; }

main { min-height: calc(100vh - 160px); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.portal-hero { padding: 38px 0 20px; }
.portal-hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 520px;
    min-height: 255px;
    align-items: center;
    gap: 45px;
}
.portal-intro { padding: 26px 32px; text-shadow: 0 3px 12px #000; }
.eyebrow { color: var(--gold-light); font-size: 12px; font-weight: 900; letter-spacing: .24em; }
.portal-intro h1 {
    margin: 5px 0 4px;
    color: #fff1bd;
    font-size: clamp(38px, 5vw, 62px);
    font-weight: 900;
    line-height: 1.05;
    text-transform: uppercase;
    letter-spacing: -.035em;
    text-shadow: 0 3px 0 #4b2308, 0 8px 22px #000;
}
.portal-intro p { margin: 0; color: #f2e8d4; font-size: 16px; font-weight: 650; }
.portal-status { display: flex; align-items: center; gap: 8px; margin-top: 17px; color: #ded1ba; font-size: 12px; }
.portal-status span { width: 9px; height: 9px; background: #66d879; border: 2px solid rgba(255,255,255,.3); border-radius: 50%; box-shadow: 0 0 12px #4fd56b; }
.portal-actions {
    display: grid;
    grid-template-columns: 165px minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
    background: linear-gradient(145deg, rgba(45, 31, 20, .88), rgba(11, 10, 8, .94));
    border: 1px solid #bb8632;
    box-shadow: inset 0 0 0 3px rgba(241, 197, 103, .08), 0 16px 38px rgba(0,0,0,.5);
}
.download-tile {
    display: flex;
    min-height: 126px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: #fff4cf;
    background: radial-gradient(circle at 50% 20%, #e84b21, #8c130b 65%, #4b0906);
    border: 2px solid #e2a744;
    box-shadow: inset 0 0 18px rgba(255,207,101,.35);
    text-align: center;
    text-decoration: none;
    transition: filter .2s, transform .2s;
}
.download-tile:hover { filter: brightness(1.12); transform: translateY(-2px); }
.download-icon { font-size: 47px; font-weight: 900; line-height: .75; text-shadow: 0 3px 0 #4a0803; }
.download-tile small { display: block; margin-top: 12px; color: #ffc465; font-size: 9px; font-weight: 800; }
.download-tile strong { display: block; margin-top: 2px; font-size: 21px; }
.quick-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.quick-links a {
    display: flex;
    min-height: 58px;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    color: #fff3c6;
    background: linear-gradient(180deg, rgba(179, 126, 45, .92), rgba(86, 53, 18, .97));
    border: 1px solid #e2b05d;
    box-shadow: inset 0 0 0 2px rgba(255,237,184,.08);
    font-size: 12px;
    font-weight: 900;
    text-align: center;
    text-decoration: none;
    text-shadow: 0 2px 3px #442405;
    transition: filter .2s, transform .2s;
}
.quick-links a:hover { filter: brightness(1.18); transform: translateY(-1px); }
.quick-links a:last-child { grid-column: 1 / -1; }

.post-section { width: min(930px, calc(100% - 40px)); padding: 4px 0 72px; }
.news-board {
    overflow: hidden;
    background: rgba(18, 13, 9, .97);
    border: 1px solid #a8772d;
    box-shadow: inset 0 0 0 3px rgba(216, 165, 68, .05), 0 18px 45px rgba(0,0,0,.58);
}
.news-board-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    align-items: stretch;
    background: linear-gradient(180deg, #36240f, #1c1309);
    border-bottom: 1px solid #9b6c28;
}
.category-tabs { display: flex; min-width: 0; align-items: stretch; }
.category-tabs a {
    display: flex;
    min-width: 105px;
    align-items: center;
    justify-content: center;
    padding: 13px 16px;
    color: #e5c986;
    border-right: 1px solid rgba(220,172,76,.18);
    font-size: 12px;
    font-weight: 850;
    text-decoration: none;
}
.category-tabs a:hover, .category-tabs a.active { color: #fff5c7; background: linear-gradient(180deg, #6e3e0d, #3b230b); box-shadow: inset 0 -3px #dca93e; }
.search-form { display: flex; align-items: center; gap: 5px; padding: 7px 8px; border-left: 1px solid rgba(220,172,76,.22); }
.search-form input {
    width: 100%;
    min-width: 0;
    height: 33px;
    padding: 0 10px;
    color: #f5ead6;
    background: #0e0c09;
    border: 1px solid #6e5122;
    outline: 0;
}
.search-form input:focus { border-color: #d9aa4d; box-shadow: 0 0 0 2px rgba(217,170,77,.14); }
.search-form input::placeholder { color: #857966; }
.search-form button {
    height: 33px;
    padding: 0 13px;
    color: #fff1c0;
    background: #7b1b12;
    border: 1px solid #bd4a32;
    font-size: 10px;
    font-weight: 900;
    cursor: pointer;
}
.news-board-title {
    display: flex;
    min-height: 43px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 16px;
    color: #ffd966;
    background: linear-gradient(90deg, #5c160d, #291207 62%, #17110b);
    border-bottom: 1px solid rgba(218,164,64,.45);
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
}
.news-board-title small { color: #aa9778; font-size: 10px; }
.result-note { padding: 10px 15px; color: #e8d5ad; background: #281c0f; border-bottom: 1px dotted #594323; font-size: 12px; }
.news-list { padding: 4px 14px 9px; }
.news-row {
    display: grid;
    grid-template-columns: 9px auto minmax(0, 1fr) 76px;
    min-height: 51px;
    align-items: center;
    gap: 8px;
    border-bottom: 1px dotted rgba(202, 160, 76, .3);
}
.news-row:last-child { border-bottom: 0; }
.news-dot { width: 5px; height: 5px; background: #d43d25; transform: rotate(45deg); box-shadow: 0 0 7px rgba(222,65,38,.5); }
.news-category { color: #e5ad3f; font-size: 11px; font-weight: 850; white-space: nowrap; }
.news-row h2 { min-width: 0; margin: 0; font-size: 13px; font-weight: 650; line-height: 1.35; }
.news-row h2 a { display: block; overflow: hidden; color: #f5e8c6; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.news-row h2 a:hover { color: #ffdb69; padding-left: 3px; }
.news-row time { color: #c7bfae; font-size: 10px; font-style: italic; text-align: right; }
.pagination { display: flex; justify-content: center; gap: 6px; padding: 16px; border-top: 1px solid rgba(199,149,58,.24); }
.pagination a {
    display: grid;
    width: 31px;
    height: 31px;
    place-items: center;
    color: #dbcaa4;
    background: #21170d;
    border: 1px solid #6d5123;
    font-size: 11px;
    font-weight: 800;
    text-decoration: none;
}
.pagination a.active, .pagination a:hover { color: #2a1604; background: #d5a247; border-color: #f1cd7c; }
.empty-state { padding: 58px 24px; text-align: center; }
.empty-state h2 { margin: 0 0 5px; color: #f7eacb; font-size: 22px; font-weight: 850; }
.empty-state p { margin: 0; color: #a89c86; }

.article-heading { padding-top: 30px; }
.article-heading-inner {
    padding: 35px 38px 38px;
    background: linear-gradient(115deg, rgba(11, 13, 14, .97), rgba(27, 20, 16, .92));
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}
.article-heading a { color: var(--gold); font-size: 11px; font-weight: 900; text-decoration: none; text-transform: uppercase; letter-spacing: .11em; }
.article-heading h1 {
    max-width: 930px;
    margin: 9px 0 13px;
    color: #fff;
    font-size: clamp(28px, 4.2vw, 44px);
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: -.02em;
}
.article-meta { display: flex; gap: 17px; color: #bdb4a8; font-size: 12px; flex-wrap: wrap; }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 285px; align-items: start; gap: 22px; padding-block: 22px 66px; }
.article-card, .related-card { border: 1px solid rgba(219, 174, 84, .3); border-radius: 7px; box-shadow: var(--shadow); }
.article-card { min-width: 0; padding: clamp(23px, 4vw, 44px); color: var(--ink); background: rgba(255, 250, 240, .97); }
.article-body { min-width: 0; overflow-wrap: anywhere; }
.article-body h1, .article-body h2, .article-body h3, .article-body h4 {
    margin: 1.45em 0 .55em;
    color: #661713;
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    font-weight: 850;
    line-height: 1.3;
}
.article-body p { margin: 0 0 1em; }
.article-body img { height: auto !important; max-width: 100% !important; margin-inline: auto; border-radius: 5px; }
.article-body table { display: block; width: 100% !important; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.article-body td, .article-body th { padding: 8px 10px; border: 1px solid #d7c9b5; }
.article-body th { color: #fff; background: #6e1714; font-weight: 800; }
.article-body tr:nth-child(even) td { background-color: #f7efe2; }
.article-body hr { height: 1px; margin: 28px 0; background: #d7c4a8; border: 0; }
.article-body a { color: #941b16; font-weight: 700; }
.article-body blockquote { margin: 1.35em 0; padding: 14px 19px; color: #5e4e40; background: #f4e9d6; border-left: 4px solid var(--gold); }
.preview-banner { margin: -15px -15px 26px; padding: 11px 14px; color: #6b4700; background: #fff0bd; border: 1px solid #ebce72; border-radius: 5px; font-weight: 750; }
.related-card { position: sticky; top: 104px; padding: 20px; color: var(--text); background: var(--panel); }
.related-card h2 { margin: 0 0 12px; padding-bottom: 9px; color: var(--gold-light); border-bottom: 1px solid var(--line); font-size: 18px; font-weight: 850; }
.related-card ul { margin: 0; padding: 0; list-style: none; }
.related-card li { padding: 11px 0; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.related-card li:last-child { border-bottom: 0; }
.related-card a { display: block; color: #eee6da; font-size: 13px; font-weight: 750; line-height: 1.42; text-decoration: none; }
.related-card a:hover { color: var(--gold-light); }
.related-card time { color: #9c9387; font-size: 10px; }

.not-found { margin-block: 50px; padding-block: 75px; text-align: center; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
.not-found > span { color: rgba(219, 174, 84, .3); font-size: 82px; font-weight: 900; line-height: 1; }
.not-found h1 { margin: 10px 0 5px; color: #fff; font-size: 34px; font-weight: 900; }
.not-found p { color: var(--muted); }
.primary-button { display: inline-block; margin-top: 14px; padding: 10px 18px; color: #fff; background: linear-gradient(180deg, #b82720, #75100e); border: 1px solid #c34a40; border-radius: 4px; font-weight: 800; text-decoration: none; }
.site-footer { color: #aaa298; background: rgba(7, 8, 9, .96); border-top: 1px solid var(--line); }
.footer-inner { display: flex; min-height: 70px; align-items: center; justify-content: space-between; gap: 20px; font-size: 12px; }
.footer-inner a { color: var(--gold); text-decoration: none; }

@media (max-width: 900px) {
    body { background-position: 42% top; }
    .header-inner { align-items: flex-start; flex-direction: column; padding-block: 16px; }
    .main-nav { justify-content: flex-start; }
    .portal-hero-inner { grid-template-columns: 1fr; gap: 12px; }
    .portal-intro { text-align: center; }
    .portal-status { justify-content: center; }
    .portal-actions { width: min(520px, 100%); margin-inline: auto; }
    .news-board-toolbar { grid-template-columns: 1fr; }
    .search-form { border-top: 1px solid rgba(220,172,76,.22); border-left: 0; }
    .article-layout { grid-template-columns: 1fr; }
    .related-card { position: static; }
}
@media (max-width: 620px) {
    .container { width: min(100% - 22px, 1120px); }
    .post-section { width: min(100% - 22px, 930px); }
    .site-header { position: relative; }
    .header-inner { gap: 14px; }
    .brand small { display: none; }
    .main-nav { gap: 4px; }
    .main-nav a { padding: 7px 8px; font-size: 11px; }
    .portal-hero { padding-top: 12px; }
    .portal-intro { padding: 20px 10px; }
    .portal-intro h1 { font-size: 35px; }
    .portal-intro p { font-size: 13px; }
    .portal-actions { grid-template-columns: 118px minmax(0, 1fr); padding: 9px; gap: 8px; }
    .download-tile { min-height: 112px; }
    .download-icon { font-size: 38px; }
    .download-tile strong { font-size: 16px; }
    .quick-links { gap: 7px; }
    .quick-links a { min-height: 52px; padding: 6px; font-size: 10px; }
    .category-tabs { overflow-x: auto; }
    .category-tabs a { min-width: 88px; padding: 11px 12px; font-size: 11px; }
    .news-board-title { padding-inline: 11px; }
    .news-list { padding-inline: 10px; }
    .news-row { grid-template-columns: 7px minmax(0, 1fr) 66px; min-height: 48px; gap: 6px; }
    .news-category { display: none; }
    .news-row h2 { font-size: 12px; }
    .news-row time { font-size: 9px; }
    .article-heading { padding-top: 12px; }
    .article-heading-inner { padding: 25px 20px; }
    .article-card { padding: 20px 15px; }
    .footer-inner { align-items: flex-start; flex-direction: column; justify-content: center; padding-block: 18px; }
}
