/* ===========================================================================
   QANON PROJECT — ВИКИ (база знаний)
   The wiki spine + the non-paper "reference / systems" surface. Shares the
   lore page's identity (dark metro "desk", red chrome, Montserrat) but drops
   the aged-paper reading surface — that stays exclusive to /lore. Everything
   here is a dark dossier panel: flat, editorial, no gloss / no glow.
   =========================================================================== */
.wiki-body {
    /* site-matched tokens (kept in sync with lore.css .lore-body) */
    --red: #cf2929;
    --red-d: #9e1414;
    --red-br: #ef3b3b;
    --bg: #0a0b0c;                 /* desk / metro dark */
    --line: rgba(255, 255, 255, .09);
    --hair: rgba(255, 255, 255, .10);   /* декоративная обводка */

    /* --- ДВИЖЕНИЕ -----------------------------------------------------------
       Раньше по всей вике стояло ключевое слово ease — то есть значение по
       умолчанию, которое никто не выбирал: 81 объявление, четыре разные
       скорости на один и тот же ховер. Четыре кривые и четыре длительности
       на всё. Вход тормозит в конце, выход разгоняется и короче входа. */
    --ease-out:  cubic-bezier(.16, 1, .3, 1);      /* появление, раскрытие */
    --ease-in:   cubic-bezier(.7, 0, .84, 0);      /* уход */
    --ease-move: cubic-bezier(.65, 0, .35, 1);     /* то, что уже на экране */
    --ease-back: cubic-bezier(.34, 1.4, .64, 1);   /* подтверждение, нажатие */

    --t-fast: .16s;   /* цвет, рамка, иконка */
    --t-base: .24s;   /* ховер карточки, подсказка */
    --t-slow: .34s;   /* раскрытие, панель */

    --rule: rgba(255, 255, 255, .26);   /* РАЗДЕЛЕНИЕ: конец одного пункта, начало другого */
    --on-dark: #e7e3da;
    --on-dark-dim: #9a948a;
    --on-dark-faint: #847e73;      /* было #6d6860 = 3.44:1, провал AA */

    /* panel surfaces — dark, matte */
    --panel: rgba(22, 23, 25, .82);
    --panel-2: rgba(28, 29, 32, .9);
    --panel-hi: rgba(255, 255, 255, .05);

    --f: "Montserrat", "Inter", system-ui, sans-serif;
    --f-read: "Inter", "Montserrat", system-ui, sans-serif;   /* NB: no serif — that's lore's paper only */

    margin: 0;
    background: var(--bg);
    color: var(--on-dark);
    font-family: var(--f);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}
.wiki-body * { box-sizing: border-box; }
.wiki-body ::selection { background: var(--red); color: #fff; }
.wiki-body a { color: inherit; text-decoration: none; }
.wiki-body a:focus-visible,
.wiki-body button:focus-visible {
    outline: 2px solid var(--red-br);
    outline-offset: 3px;
    border-radius: 6px;
}

/* custom page scrollbar — same as lore, so the whole wiki feels one piece */
.wiki-html { scrollbar-width: thin; scrollbar-color: var(--red-d) rgba(10, 10, 11, .55); scroll-behavior: smooth; }
.wiki-html::-webkit-scrollbar { width: 14px; }
.wiki-html::-webkit-scrollbar-track {
    background: linear-gradient(90deg, rgba(0, 0, 0, .5), rgba(12, 13, 14, .8));
    box-shadow: inset 1px 0 0 rgba(255, 255, 255, .04);
}
.wiki-html::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--red-br), var(--red-d));
    background-clip: padding-box;
    border: 3px solid transparent;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(207, 41, 41, .45), inset 0 1px 0 rgba(255, 255, 255, .3);
}
.wiki-html::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #ff5b50, var(--red));
    background-clip: padding-box;
}

/* ---- atmospheric background (the "desk"), shared with lore ---------------- */
.wiki-bg {
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        linear-gradient(180deg, rgba(10, 10, 11, .74), rgba(8, 9, 10, .9)),
        url(../img/main-bg.webp) 78% 60%/cover no-repeat fixed;
    filter: saturate(.72) contrast(1.05);
}
.wiki-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 90% at 50% 8%, transparent 42%, rgba(0, 0, 0, .78) 100%);
}
.wiki-grain {
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image: url(../img/paper-grain-tile.png);
    background-size: 512px;
    opacity: .04;
    pointer-events: none;
}

/* ===========================================================================
   TOP HEADER — site-level nav (На главную · Как играть · Википедия). Matches
   the lore page's header treatment so the whole site reads as one. The wiki
   SECTION switching lives in the left rail (wiki-rail.css), not here.
   =========================================================================== */
.wiki-topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 9000;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 12px clamp(16px, 4vw, 40px);
    background: linear-gradient(180deg, rgba(8, 8, 9, .96), rgba(8, 8, 9, .55) 70%, transparent);
    transition: background var(--t-slow) var(--ease-out), padding var(--t-slow) var(--ease-out), box-shadow var(--t-slow) var(--ease-out);
}
.wiki-topbar.is-scrolled {
    padding: 8px clamp(16px, 4vw, 40px);
    background: rgba(10, 10, 11, .94);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 var(--line), 0 10px 24px rgba(0, 0, 0, .45);
}
.wiki-topbar__logo {
    flex: 0 0 auto;
    width: 132px; height: 38px;
    background: url(../img/logonew.png) left center/contain no-repeat;
}
.wiki-topbar__nav {
    flex: 1 1 auto;
    display: flex; align-items: center; justify-content: center;
    gap: 26px;
    margin: 0; padding: 0; list-style: none;
    min-width: 0;
}
.wiki-topbar__nav a, .wiki-topbar__nav li {
    font-size: 14px; font-weight: 600;
    color: var(--on-dark-dim);
    white-space: nowrap;
    transition: color var(--t-base) var(--ease-out);
}
.wiki-topbar__nav a:hover { color: var(--on-dark); }
.wiki-topbar__nav li.is-active { color: var(--red-br); cursor: default; }
.wiki-topbar__cta {
    flex: 0 0 auto;
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 12.5px; font-weight: 700;
    padding: 10px 16px; border-radius: 8px;
    color: #fff;
    background: var(--red-d);
    border: 1px solid var(--red-d);
    transition: background var(--t-base) var(--ease-out), transform var(--t-base) var(--ease-out);
}
.wiki-topbar__cta:hover { background: var(--red); border-color: var(--red); transform: translateY(-1px); }
.wiki-topbar__cta svg { width: 17px; height: 17px; fill: currentColor; }

/* ===========================================================================
   PAGE SHELL
   =========================================================================== */
.wiki-main {
    position: relative;
    z-index: 1;
    max-width: 1080px;
    margin: 0 auto;
    padding: clamp(96px, 12vh, 150px) clamp(16px, 4vw, 32px) 60px;
}

/* section intro header (used by hub + each section) */
.wiki-lead {
    text-align: center;
    padding: 0 8px clamp(28px, 5vw, 52px);
}
.wiki-lead__kicker {
    display: inline-flex; align-items: center; gap: 12px;
    font-weight: 700; letter-spacing: .24em; text-transform: uppercase;
    font-size: 11.5px; color: var(--on-dark-faint);
    margin-bottom: 18px;
}
.wiki-lead__kicker::before, .wiki-lead__kicker::after {
    content: ""; width: 22px; height: 1px; background: rgba(158, 20, 20, .6);
}
.wiki-lead__title {
    margin: 0;
    font-weight: 800;
    font-size: clamp(34px, 6vw, 62px);
    line-height: 1.04;
    letter-spacing: -.01em;
    color: var(--on-dark);
    text-shadow: 0 2px 30px rgba(0, 0, 0, .5);
}
.wiki-lead__sub {
    margin: 16px auto 0;
    max-width: 620px;
    font-family: var(--f-read);
    font-size: 15.5px; line-height: 1.6;
    color: var(--on-dark-dim);
}

/* ===========================================================================
   HUB — the four section entry cards
   =========================================================================== */
.wiki-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}
.wiki-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 210px;
    padding: 26px 26px 22px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    overflow: hidden;
    transition: border-color var(--t-base) var(--ease-out), transform var(--t-base) var(--ease-out), background var(--t-base) var(--ease-out);
}
.wiki-card::before {                /* index watermark */
    content: attr(data-i);
    position: absolute;
    right: 14px; top: 2px;
    font-size: 92px; font-weight: 800;
    line-height: 1;
    color: rgba(255, 255, 255, .035);
    pointer-events: none;
}
.wiki-card:hover { border-color: rgba(239, 59, 59, .5); transform: translateY(-3px); background: var(--panel-2); }
.wiki-card__tag {
    font-size: 11px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase;
    color: var(--red-br);
}
.wiki-card__title {
    margin: 10px 0 8px;
    font-size: clamp(20px, 2.4vw, 26px); font-weight: 800;
    color: var(--on-dark);
}
.wiki-card__desc {
    font-family: var(--f-read);
    font-size: 14px; line-height: 1.55;
    color: var(--on-dark-dim);
}
.wiki-card__go {
    margin-top: auto;
    padding-top: 16px;
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    color: var(--on-dark);
}
.wiki-card__go i {
    transition: transform var(--t-base) var(--ease-out);
    font-style: normal; color: var(--red-br);
}
.wiki-card:hover .wiki-card__go i { transform: translateX(5px); }
.wiki-card.is-soon { opacity: .96; }
.wiki-card.is-soon .wiki-card__go { color: var(--on-dark-faint); }
.wiki-card__badge {
    align-self: flex-start;
    margin-top: 10px;
    font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
    color: var(--on-dark-dim);
    padding: 3px 9px; border: 1px solid var(--line); border-radius: 999px;
}

/* ===========================================================================
   SECTION SURFACE — reference blocks (economy / mechanics / factions)
   =========================================================================== */
.wiki-sec {
    margin: 0 0 clamp(28px, 4vw, 44px);
    scroll-margin-top: 92px;          /* clear the fixed header when jumped to via #anchor */
}
.wiki-sec__h {
    display: flex; align-items: center; gap: 12px;
    margin: 0 0 18px;
    font-size: clamp(19px, 2.4vw, 24px); font-weight: 800;
    color: var(--on-dark);
}
.wiki-sec__h::before {
    content: ""; width: 4px; height: 1.1em; border-radius: 2px;
    background: linear-gradient(var(--red), var(--red-d));
}
.wiki-panel {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel);
    padding: clamp(20px, 3vw, 30px);
}
.wiki-p {
    font-family: var(--f-read);
    font-size: 15px; line-height: 1.7;
    color: var(--on-dark);
    margin: 0 0 14px;
}
.wiki-p:last-child { margin-bottom: 0; }
.wiki-muted { color: var(--on-dark-dim); }

/* placeholder "in progress" state for stubbed sections */
.wiki-soon {
    text-align: center;
    padding: clamp(40px, 7vw, 80px) 24px;
    border: 1px dashed var(--line);
    border-radius: 14px;
    background: rgba(18, 19, 21, .5);
}
.wiki-soon__mark {
    font-size: 12px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase;
    color: var(--red-br);
}
.wiki-soon__t { margin: 14px 0 8px; font-size: clamp(22px, 3vw, 30px); font-weight: 800; }
.wiki-soon__d { max-width: 520px; margin: 0 auto; color: var(--on-dark-dim); font-family: var(--f-read); font-size: 14.5px; line-height: 1.6; }

/* stat cards — the reference vocabulary (numbers at a glance) */
.wiki-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}
.wiki-stat {
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--panel-2);
}
.wiki-stat__v { font-size: 26px; font-weight: 800; color: #fff; }
.wiki-stat__v small { font-size: 14px; font-weight: 700; color: var(--red-br); margin-left: 2px; }
.wiki-stat__k { margin-top: 4px; font-size: 12px; letter-spacing: .04em; color: var(--on-dark-dim); }

/* data table */
.wiki-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.wiki-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 460px; }
.wiki-table th, .wiki-table td { text-align: left; padding: 12px 16px; }
.wiki-table thead th {
    font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
    color: var(--on-dark-dim);
    background: rgba(255, 255, 255, .03);
    border-bottom: 1px solid var(--line);
}
.wiki-table tbody tr + tr td { border-top: 1px solid rgba(255, 255, 255, .06); }
.wiki-table tbody tr:hover td { background: rgba(255, 255, 255, .025); }
.wiki-table td.num { font-variant-numeric: tabular-nums; color: #fff; font-weight: 600; }

/* ===========================================================================
   FOOTER — reuse the compact lore footer treatment
   =========================================================================== */
.wiki-body .footer {
    position: relative; z-index: 10;
    height: auto; margin-top: 40px;
    align-items: flex-start;
    padding: 34px 0 46px;
}
.wiki-body .footer_bg { z-index: 1; height: 260px; opacity: .3; }
.wiki-body .footer_design { height: auto; align-self: center; }

/* ===========================================================================
   REVEAL — safe by default; JS "arms" it (mirrors lore.js convention)
   =========================================================================== */
.wiki-reveal { opacity: 1; transform: none; }
.wiki-html.reveal-armed .wiki-reveal {
    opacity: 0; transform: translateY(20px);
    transition: opacity .7s cubic-bezier(.16,1,.3,1) var(--d,var(--t-fast)), transform .8s cubic-bezier(.16,1,.3,1) var(--d,var(--t-fast));
}
.wiki-html.reveal-armed .wiki-reveal.is-visible { opacity: 1; transform: none; }

/* ===========================================================================
   RESPONSIVE
   =========================================================================== */
/* below the rail breakpoint the rail is a horizontal strip under the header,
   so page content needs extra top clearance for both bars */
@media (max-width: 1180px) {
    .wiki-main { padding-top: 128px; }
}
@media (max-width: 820px) {
    .wiki-cards { grid-template-columns: 1fr; }
    .wiki-topbar__cta span { display: none; }
    .wiki-topbar__nav { gap: 18px; }
    .wiki-topbar__logo { width: 112px; height: 32px; }
}
@media (max-width: 560px) {
    .wiki-topbar__nav { display: none; }   /* wiki nav lives in the rail strip; logo = home */
}

@media (prefers-reduced-motion: reduce) {
    .wiki-bg { background-attachment: scroll; }
    .wiki-card:hover { transform: none; }
    .wiki-html.reveal-armed .wiki-reveal { opacity: 1; transform: none; transition: none; }
}

/* ===========================================================================
   ШАПКА: ЛОГОТИП И DISCORD КАК НА ЛЕНДИНГЕ
   В вики логотип не реагировал на наведение, а кнопка Discord была красной —
   вне фирменного стиля. Повторяем поведение лендинга (.header_logo и
   .header_btn из style.css) один в один: белое свечение под логотипом и
   синяя кнопка Discord с подсветкой того же цвета.
   =========================================================================== */
.wiki-topbar__logo {
    cursor: pointer;
    transition: filter var(--t-base) ease-in-out, transform var(--t-base) ease-in-out;
}
.wiki-topbar__logo:hover {
    filter: drop-shadow(1px 1px 30px white);
}

/* Кнопка Discord — копия лендинговой (.header_btn из polish.css): тёмная
   подложка, светящаяся рамка через маску и пятно, следующее за курсором.
   Плоская синяя, которую я поставил сначала, была не тем стилем. */
.wiki-topbar__cta {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    width: auto;
    height: 46px;
    padding: 0 26px;
    gap: 11px;
    border: none;
    border-radius: 12px;
    background: #131417;
    color: #f2f3f5;
    font-family: "Inter", system-ui, sans-serif;
    font-weight: 600;
    font-size: 14px;
    --mx: 50%;
    --my: 0%;
    box-shadow: 0 0 22px -10px rgba(88, 101, 242, .45);
    transition: transform var(--t-slow) var(--ease-out), box-shadow var(--t-slow) var(--ease-out);
}
/* внутреннее заполнение-пятно у курсора */
.wiki-topbar__cta::after {
    content: "";
    position: absolute; inset: 0;
    border-radius: inherit;
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(circle 130px at var(--mx) var(--my), rgba(88, 101, 242, .30), transparent 60%);
}
/* светящаяся рамка с ярким пятном у курсора */
.wiki-topbar__cta::before {
    content: "";
    position: absolute; inset: 0;
    border-radius: inherit;
    padding: 1.4px;
    pointer-events: none;
    background: radial-gradient(circle 150px at var(--mx) var(--my), #8b95ff, #5865f2 22%, rgba(88, 101, 242, .14) 52%, rgba(88, 101, 242, .08));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
            mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
}
.wiki-topbar__cta:hover {
    background: #131417;
    filter: none;
    transform: translateY(-1px);
    box-shadow: 0 0 30px -6px rgba(88, 101, 242, .6);
}
.wiki-topbar__cta svg { width: 22px; height: 22px; flex: 0 0 auto; }

@media (max-width: 820px) {
    /* на узком экране подпись прячется — кнопка становится квадратной */
    .wiki-topbar__cta { padding: 0 14px; }
}

/* ===========================================================================
   ШАПКА ВИКИ = ШАПКА ЛЕНДИНГА (style.css .header / polish.css .header_btn)
   Логотип 222×62, пункты — Inter 14/400 #d8d8d8 с шагом 24px, отступы
   шапки 16px (при прокрутке 10px), кнопка Discord 46px — один в один.
   =========================================================================== */
@media (min-width: 821px) {
    .wiki-topbar { padding-top: 16px; padding-bottom: 16px; }
    .wiki-topbar.is-scrolled { padding-top: 10px; padding-bottom: 10px; }
    .wiki-topbar__logo { width: 222px; height: 62px; background-position: center; background-size: cover; }
}
.wiki-topbar__nav { gap: 24px; }
.wiki-topbar__nav a, .wiki-topbar__nav li {
    font-family: "Inter", system-ui, sans-serif;
    font-size: 14px; font-weight: 400; line-height: 16.94px;
    color: #d8d8d8;
    transition: color .2s ease-in;
}
.wiki-topbar__nav a:hover { color: #fff; }
/* ===========================================================================
   ШАПКА ВИКИ: тёмная с мягким градиентом. При прокрутке вниз уезжает вверх,
   при прокрутке вверх возвращается (wiki.js), как на лендинге. Липкие рейл и
   поиск едут следом через --rail-top-live; отступ контента не меняется.
   Пункты - контурные кнопки с иконкой, как на лендинге (polish.css).
   =========================================================================== */
.wiki-topbar, .wiki-topbar.is-scrolled {
    background: linear-gradient(180deg,rgba(6,6,7,.97) 0%,rgba(10,10,11,.9) 60%,rgba(13,13,14,.82) 100%);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .45);
}
.wiki-topbar { transition: transform .35s ease, padding var(--t-slow) var(--ease-out); }
.wiki-topbar.is-away { transform: translateY(-100%); box-shadow: none; }
.wiki-topbar::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; pointer-events: none;
    background: linear-gradient(90deg,rgba(255,255,255,0),rgba(255,255,255,.07) 30%,rgba(255,255,255,.07) 70%,rgba(255,255,255,0));
}
@property --rail-top-live { syntax: "<length>"; inherits: true; initial-value: 0px; }
:root { --rail-top-live: var(--rail-top); transition: --rail-top-live .35s ease; }
html.wiki-top-hidden { --rail-top-live: 0px; }
.wiki-topbar__nav {
    flex: 0 0 auto; width: max-content; margin-left: auto; margin-right: auto;
    justify-content: flex-start; gap: 12px;
}
.wiki-topbar__nav > li > a {
    --hc: #cf2929;
    position: relative; isolation: isolate; display: flex; align-items: center; gap: 8px;
    height: 38px; padding: 0 16px 0 12px; box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, .28); border-radius: 12px;
    background-color: rgba(22, 23, 25, .82);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07);
    font-family: inter; font-size: 13.5px; font-weight: 600; line-height: 1; letter-spacing: .01em; color: #f1f1f1; white-space: nowrap;
    filter: drop-shadow(0 0 0 transparent);
    transition: border-color .28s ease, background-color .28s ease, filter .28s ease, transform .45s cubic-bezier(.34, 1.4, .5, 1);
}
.wiki-topbar__nav > li > a::before {
    content: ""; width: 18px; height: 18px; flex: 0 0 auto; background-color: #ff6464;
    -webkit-mask: var(--ico) center/contain no-repeat; mask: var(--ico) center/contain no-repeat;
    transition: background-color .28s ease, transform .45s cubic-bezier(.34, 1.4, .5, 1);
}
/* пятно света под кнопкой, как у кнопок лендинга */
.wiki-topbar__nav > li > a::after {
    content: ""; position: absolute; z-index: -1; left: 14%; right: 14%; bottom: -14px; height: 24px; pointer-events: none;
    border-radius: 50%; background: radial-gradient(closest-side, var(--hc), transparent);
    filter: blur(10px); opacity: 0; transform: scaleX(.7);
    transition: opacity .35s ease, transform .45s cubic-bezier(.2, .8, .2, 1);
}
.wiki-topbar__nav > li > a[href="/"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 11.5L12 4l8.5 7.5'/%3E%3Cpath d='M6 10.5V20h12v-9.5'/%3E%3Cpath d='M10 20v-5h4v5'/%3E%3C/svg%3E"); }
.wiki-topbar__nav > li > a[href="#play"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M10.3 8.9v6.2a.55.55 0 0 0 .84.47l4.9-3.1a.55.55 0 0 0 0-.94l-4.9-3.1a.55.55 0 0 0-.84.47z' fill='black' stroke='none'/%3E%3C/svg%3E"); }
.wiki-topbar__nav > li > a[href="/wiki"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 6.6C10.2 5.3 7.6 4.7 4.3 4.9v12.6c3.3-.2 5.9.4 7.7 1.7 1.8-1.3 4.4-1.9 7.7-1.7V4.9c-3.3-.2-5.9.4-7.7 1.7z'/%3E%3Cpath d='M12 6.6v12.6'/%3E%3C/svg%3E"); }
.wiki-topbar__nav > li > a:hover, .wiki-topbar__nav > li > a:focus-visible {
    background-color: var(--hc); border-color: var(--hc); color: #fff; outline: none;
    filter: drop-shadow(0 0 15px rgba(243, 63, 63, .7));
}
.wiki-topbar__nav > li > a:hover::before { background-color: #fff; transform: scale(1.1); }
.wiki-topbar__nav > li > a:hover::after { opacity: .9; transform: none; }
.wiki-topbar__nav > li > a:active { transform: translateY(1px) scale(.98); }

/* ===========================================================================
   ШАПКА-«ШТОРКА» - как на лендинге (polish.css + ux.js): по краям тонкая
   полоса, от логотипа до Discord полная высота, между ними плавные плечи.
   Контур считает wiki.js (--hdr-clip); без JS шапка прямоугольная.
   =========================================================================== */
@media screen and (min-width: 796px) {
    .wiki-topbar, .wiki-topbar.is-scrolled {
        /* содержимое в той же ширине, что на лендинге (1200px) - по краям остаются плечи шторки */
        height: 68px; padding: 0 max(clamp(16px, 4vw, 40px), calc((100% - 1200px) / 2));
        background: none; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none;
    }
    .wiki-topbar::before {
        content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
        background: linear-gradient(180deg, rgba(6,6,7,.97) 0%, rgba(10,10,11,.92) 60%, rgba(13,13,14,.88) 100%);
        -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    }
    .wiki-topbar.has-shape::before { clip-path: var(--hdr-clip); }
    .wiki-topbar.is-away { transform: translateY(calc(-100% - 44px)); }
    .wiki-topbar > .hdr-shade, .wiki-topbar > .hdr-edge { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
    .wiki-topbar > .hdr-shade { z-index: -1; top: 5px; opacity: .6; }
    .wiki-topbar > .hdr-shade path { fill: #000; }
    .wiki-topbar > .hdr-edge { z-index: 1; }
    .wiki-topbar:not(.has-shape) > .hdr-shade, .wiki-topbar:not(.has-shape) > .hdr-edge { display: none; }
    .wiki-topbar > .wiki-topbar__logo, .wiki-topbar > .wiki-topbar__nav, .wiki-topbar > .wiki-topbar__cta { position: relative; z-index: 2; }
}
