

/* Start:/local/templates/bago_wiki/assets/tokens.css?17847873001839*/
/*
 * BAGO family design tokens.
 * Источник: bago.family/en/ (production), снято 2026-05-13.
 * Используется как единственный источник цветов/типографики/геометрии в шаблоне bago_wiki.
 */

:root {
    /* Surfaces */
    --bg: #ffffff;
    --surface: #ffffff;
    --surface-muted: #fafafa;
    --surface-elevated: #fcfcfc;

    /* Text */
    --text: #111111;
    --text-muted: #6b6b6b;
    --graphite: #5d6068;

    /* Lines */
    --line: #eaeaea;
    --line-soft: #f0f0f0;

    /* Accents */
    --blue: #6fa8ff;
    --violet: #9c7bff;
    --green: #79bf63;
    --coral: #ff8a76;
    --teal: #8eb9b6;
    --yellow: #ffc94d;

    /* Accent soft variants */
    --accent: var(--blue);
    --accent-soft: rgba(111, 168, 255, 0.20);
    --accent-dot: rgba(111, 168, 255, 0.34);

    /* Focus */
    --focus: 0 0 0 3px rgba(111, 168, 255, 0.35);

    /* Shadows */
    --shadow-sm: 0 10px 24px rgba(17, 17, 17, 0.04);
    --shadow-md: 0 20px 50px rgba(17, 17, 17, 0.08);
    --shadow-lg: 0 28px 70px rgba(17, 17, 17, 0.10);

    /* Radius */
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 28px;
    --radius-pill: 999px;

    /* Layout */
    --container: 1240px;
    --header-h: 80px;
    --space: clamp(24px, 2.4vw, 34px);
    --section-pad: var(--space);
    --gutter: var(--space);

    /* Typography scale */
    --fs-h1: clamp(2.4rem, 4.2vw, 4rem);
    --fs-h2: clamp(1.75rem, 2.8vw, 2.25rem);
    --fs-h3: clamp(1.2rem, 1.7vw, 1.45rem);
    --fs-h4: clamp(1.05rem, 1.3vw, 1.2rem);
    --fs-body: clamp(1rem, 1.1vw, 1.0625rem);
    --fs-small: 0.875rem;
    --line-height-body: 1.65;
    --line-height-heading: 1.2;

    /* Font stack */
    --font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* End */


/* Start:/local/templates/bago_wiki/assets/template_styles.css?178489930414580*/
/*
 * BAGO Wiki — основные стили шаблона (layout, header, footer, типографика).
 * Все цвета/радиусы/типографика — через переменные из tokens.css.
 * Файл styles.css — стили для контентных блоков (статья, бренд, термин).
 */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body.bw {
    position: relative;
    isolation: isolate;
    margin: 0;
    background:
        radial-gradient(circle at 84% 10%, rgba(111,168,255,.06), transparent 18%),
        radial-gradient(circle at 8% 92%, rgba(156,123,255,.05), transparent 16%),
        linear-gradient(180deg,#fff 0%,#fbfcfe 100%);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: var(--fs-body);
    line-height: var(--line-height-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

body.bw::before {
    content: "";
    position: fixed;
    inset: -10vh -10vw;
    pointer-events: none;
    z-index: -2;
    background:
        radial-gradient(circle at 12% 18%, rgba(111,168,255,.11) 0 8px, transparent 9px),
        radial-gradient(circle at 24% 68%, rgba(109,191,107,.10) 0 10px, transparent 11px),
        radial-gradient(circle at 41% 30%, rgba(255,122,107,.10) 0 7px, transparent 8px),
        radial-gradient(circle at 58% 84%, rgba(255,201,77,.12) 0 11px, transparent 12px),
        radial-gradient(circle at 74% 18%, rgba(156,123,255,.10) 0 9px, transparent 10px),
        radial-gradient(circle at 88% 62%, rgba(142,185,182,.11) 0 8px, transparent 9px);
    background-repeat: no-repeat;
    animation: bgFloat 18s ease-in-out infinite alternate;
    opacity: .95;
    filter: blur(.3px);
}
body.bw::after {
    content: "";
    position: fixed;
    inset: -12vh -12vw;
    pointer-events: none;
    z-index: -3;
    background:
        radial-gradient(circle at 18% 86%, rgba(111,168,255,.07) 0 18px, transparent 19px),
        radial-gradient(circle at 34% 12%, rgba(109,191,107,.07) 0 16px, transparent 17px),
        radial-gradient(circle at 64% 36%, rgba(255,122,107,.06) 0 15px, transparent 16px),
        radial-gradient(circle at 82% 82%, rgba(255,201,77,.07) 0 20px, transparent 21px),
        radial-gradient(circle at 90% 22%, rgba(156,123,255,.06) 0 17px, transparent 18px);
    background-repeat: no-repeat;
    animation: bgFloat2 24s ease-in-out infinite alternate;
    opacity: .7;
    filter: blur(1px);
}
.site-ambient {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}
.site-ambient__spot {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: var(--size);
    height: var(--size);
    border-radius: 50%;
    background: var(--color);
    opacity: var(--opacity, .22);
    filter: blur(var(--blur, 2px));
    will-change: transform;
}
@keyframes bgFloat {
    0% { transform: translate3d(0,0,0); }
    50% { transform: translate3d(0,-2.5vh,0); }
    100% { transform: translate3d(-1.5vw,2vh,0); }
}
@keyframes bgFloat2 {
    0% { transform: translate3d(0,0,0); }
    50% { transform: translate3d(1.5vw,-2vh,0); }
    100% { transform: translate3d(-1vw,2.5vh,0); }
}

a {
    color: var(--text);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}
a:hover { color: var(--blue); }

:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }

.bw-container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

/* === Skip link === */
.bw-skip {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--text);
    color: #fff;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    z-index: 1000;
}
.bw-skip:focus { left: 16px; top: 16px; }

/* === Header === */
.bw-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, .84);
    border-bottom: 1px solid rgba(234, 234, 234, .85);
    backdrop-filter: saturate(180%) blur(12px);
}
.bw-header__inner {
    height: var(--header-h);
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 32px;
}

.bw-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text);
}
.bw-brand__logo { width: 40px; height: 40px; }
.bw-brand__text { display: flex; flex-direction: column; line-height: 1.2; }
.bw-brand__name { font-weight: 600; font-size: 1.05rem; letter-spacing: -0.01em; }
.bw-brand__sub { font-size: 0.78rem; color: var(--text-muted); }

/* === Nav === */
.bw-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 24px; }
.bw-nav a {
    position: relative;
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 4px;
    transition: color .25s ease;
}
.bw-nav a:hover, .bw-nav .selected a {
    color: var(--text);
}
.bw-nav a::after {
    content: "";
    position: absolute;
    left: 4px;
    right: 4px;
    bottom: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--blue), var(--green));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .25s ease;
}
.bw-nav a:hover::after, .bw-nav .selected a::after {
    transform: scaleX(1);
}

.bw-header__actions {
    display: flex;
    align-items: center;
    gap: 16px;
}
.bw-visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.bw-search-mini input { width: 150px; border: 1px solid var(--line); border-radius: var(--radius-pill); background: var(--surface-muted); padding: 8px 14px; font: inherit; }
.bw-search-mini__submit { display: none; }
.bw-search-mini__toggle {
    display: none;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: var(--text);
    background: transparent;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    cursor: pointer;
}
.bw-search-mini__toggle svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
}

/* === Lang switcher === */
.bw-lang {
    display: inline-flex;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    padding: 2px;
    background: var(--surface-muted);
}
.bw-lang__item {
    text-decoration: none;
    color: var(--text-muted);
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius-pill);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.bw-lang__item.is-active {
    background: var(--text);
    color: #fff;
}

/* === Burger (mobile) === */
.bw-burger {
    display: none;
    width: 40px; height: 40px;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 8px;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}
.bw-burger span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text);
    border-radius: 999px;
    transition: transform .25s ease, opacity .25s ease;
}
.bw-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(10px) rotate(45deg); }
.bw-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.bw-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }

/* === Breadcrumbs === */
.bw-breadcrumbs {
    padding: 16px 0;
    border-bottom: 1px solid var(--line-soft);
    font-size: var(--fs-small);
    color: var(--text-muted);
}
.bw-breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.bw-breadcrumbs li { display: inline-flex; align-items: center; gap: 8px; }
.bw-breadcrumbs li + li::before { content: "/"; color: var(--line); }
.bw-breadcrumbs a { color: var(--text-muted); text-decoration: none; }
.bw-breadcrumbs a:hover { color: var(--blue); }
.bw-breadcrumbs li[aria-current="page"] { color: var(--text); }

/* === Main === */
.bw-main { padding: clamp(32px, 5vw, 64px) 0 80px; }

.bw-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, .82);
    backdrop-filter: blur(8px);
    color: var(--text-muted);
    font-size: .9rem;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0;
    text-transform: none;
}
.bw-kicker::before {
    content: "";
    width: 8px;
    height: 8px;
    flex: none;
    margin-right: 42px;
    border-radius: 50%;
    background: var(--blue);
    box-shadow: 18px 0 0 var(--green), 36px 0 0 var(--coral);
}
.bw-home-hero { max-width: 840px; padding: clamp(24px, 6vw, 72px) 0; }
.bw-home-hero__lead { max-width: 720px; color: var(--text-muted); font-size: 1.25rem; }
.bw-hub-grid, .bw-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.bw-hub-card, .bw-content-card { display: flex; flex-direction: column; gap: 8px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); color: var(--text); text-decoration: none; }
.bw-hub-card:hover, .bw-content-card:hover { border-color: var(--blue); box-shadow: var(--shadow-sm); }
.bw-hub-card span, .bw-content-card span { color: var(--text-muted); font-size: .94rem; }
.bw-content-card span {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}
.bw-latest, .bw-listing { margin-top: 56px; }
.bw-empty { min-height: 45vh; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }

/* === Headings === */
h1, h2, h3, h4 {
    font-family: var(--font-sans);
    color: var(--text);
    line-height: var(--line-height-heading);
    letter-spacing: -0.015em;
    margin: 0 0 0.6em;
}
h1 { font-size: var(--fs-h1); font-weight: 700; }
h2 { font-size: var(--fs-h2); font-weight: 700; margin-top: 1.8em; }
h3 { font-size: var(--fs-h3); font-weight: 600; margin-top: 1.4em; }
h4 { font-size: var(--fs-h4); font-weight: 600; }

p { margin: 0 0 1.1em; }

/* === Footer === */
.bw-footer {
    background: var(--surface-muted);
    border-top: 1px solid var(--line);
    margin-top: 80px;
}
.bw-footer__inner {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    padding: 56px 0 32px;
}
.bw-footer__col { min-width: 0; }
.bw-footer__title {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin: 0 0 16px;
}
.bw-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bw-footer a { text-decoration: none; color: var(--text); }
.bw-footer a:hover { color: var(--blue); }
.bw-footer__lead { color: var(--text-muted); font-size: 0.92rem; margin: 16px 0 0; }
.bw-brand--footer .bw-brand__name { font-size: 1rem; }
.bw-footer__bottom { border-top: 1px solid var(--line); padding: 20px 0; }
.bw-footer__bottom-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.bw-footer__copyright { color: var(--text-muted); font-size: var(--fs-small); }
.bw-back-to-top {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    text-decoration: none;
    color: var(--text);
    background: var(--surface);
}

/* === Responsive === */
@media (max-width: 960px) {
    .bw-header__inner {
        position: relative;
        display: flex;
        min-height: 64px;
        height: auto;
        gap: 12px;
    }
    .bw-nav { display: none; }
    .bw-nav.bw-nav--open {
        display: block;
        position: absolute;
        z-index: 2;
        top: 100%;
        left: 50%;
        width: 100vw;
        padding: 18px var(--gutter) 22px;
        background: rgba(255, 255, 255, .98);
        border-bottom: 1px solid var(--line);
        transform: translateX(-50%);
        border-radius: 0;
        box-shadow: var(--shadow-md);
        backdrop-filter: blur(12px);
    }
    .bw-nav.bw-nav--open ul { display: grid; gap: 2px; }
    .bw-nav.bw-nav--open a {
        display: block;
        padding: 12px;
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: var(--radius-sm);
    }
    .bw-nav.bw-nav--open a::after { display: none; }
    .bw-header__actions { flex: 1; min-width: 0; gap: 8px; }
    .bw-header__actions .bw-lang { order: 1; flex: none; }
    .bw-search-mini {
        order: 2;
        margin-left: auto;
        display: flex;
        align-items: center;
        gap: 8px;
    }
    .bw-search-mini input { display: none; }
    .bw-search-mini__toggle { display: inline-flex; flex: none; }
    .bw-search-mini.is-open {
        position: absolute;
        z-index: 4;
        inset: 0;
        margin: 0;
        padding: 12px var(--gutter);
        gap: 10px;
        background: var(--surface);
    }
    .bw-search-mini.is-open input {
        display: block;
        order: 1;
        flex: 1;
        width: 100%;
        min-width: 0;
        height: 40px;
    }
    .bw-search-mini.is-open .bw-search-mini__toggle { display: none; }
    .bw-search-mini.is-open .bw-search-mini__submit {
        display: inline-flex;
        order: 2;
        align-items: center;
        justify-content: center;
        height: 40px;
        padding: 0 18px;
        color: #fff;
        background: var(--text);
        border: 1px solid var(--text);
        border-radius: var(--radius-pill);
        font: inherit;
        font-weight: 600;
        cursor: pointer;
    }
    .bw-burger { display: inline-flex; order: 3; flex: none; }
    .bw-footer__inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
    .bw-footer__inner { grid-template-columns: 1fr; gap: 32px; padding: 40px 0 24px; }
    .bw-brand__text { display: none; }
    .bw-brand { flex: none; }
    .bw-lang__item { padding: 5px 9px; }
}
@media (prefers-reduced-motion: reduce) {
    body.bw::before, body.bw::after { animation: none; }
    .bw-nav a::after, .bw-burger span { transition: none; }
}

/* End */


/* Start:/local/templates/bago_wiki/assets/styles.css?178530691221092*/
/*
 * BAGO Wiki — стили контентных блоков: статья, бренд, термин, FAQ, facts, TOC,
 * citation. Lay-out живёт в template_styles.css; здесь — только «контент-сторона».
 */

/* === Article layout === */
.bw-page-shell {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: clamp(28px, 3vw, 44px);
    align-items: start;
}
.bw-page-content { min-width: 0; }
.bw-sidebar {
    position: sticky;
    top: calc(var(--header-h) + 24px);
    max-height: calc(100vh - var(--header-h) - 48px);
    overflow: auto;
    scrollbar-width: thin;
}
.bw-sidebar__nav {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, .88);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(10px);
}
.bw-sidebar__title {
    margin: 0 0 12px;
    color: var(--text-muted);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.bw-sidebar ul {
    margin: 0;
    padding: 0;
    list-style: none;
}
.bw-sidebar__area + .bw-sidebar__area { margin-top: 3px; }
.bw-sidebar__area-head,
.bw-sidebar__branch-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 28px;
    align-items: start;
    gap: 4px;
}
.bw-sidebar__area-head > a {
    min-width: 0;
    padding: 7px 8px;
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: .94rem;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none;
}
.bw-sidebar__area-head > a:hover,
.bw-sidebar__area-head > a[aria-current="location"] {
    color: var(--blue);
    background: var(--surface-muted);
}
.bw-sidebar__toggle {
    position: relative;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
}
.bw-sidebar__toggle::before {
    content: "";
    position: absolute;
    inset: 8px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    transition: transform .18s ease;
}
.bw-sidebar__toggle[aria-expanded="true"]::before {
    transform: translateY(2px) rotate(225deg);
}
.bw-sidebar__toggle:hover { color: var(--blue); background: var(--surface-muted); }
.bw-sidebar__nested {
    margin: 2px 0 5px 10px !important;
    padding-left: 10px !important;
    border-left: 1px solid var(--line);
}
.bw-sidebar__nested[hidden] { display: none; }
.bw-sidebar__branch-title {
    min-width: 0;
    padding: 6px 6px;
    color: var(--text-muted);
    font-size: .82rem;
    font-weight: 600;
    line-height: 1.3;
}
.bw-sidebar__branch.is-open > .bw-sidebar__branch-head .bw-sidebar__branch-title {
    color: var(--blue);
    background: rgba(111, 168, 255, .08);
    border-radius: 6px;
}
.bw-sidebar__item a {
    display: block;
    padding: 6px;
    border-radius: 6px;
    color: var(--text-muted);
    font-size: .79rem;
    line-height: 1.35;
    text-decoration: none;
}
.bw-sidebar__item a:hover { color: var(--blue); }
.bw-sidebar__item a[aria-current="page"] {
    color: var(--blue);
    background: rgba(111, 168, 255, .12);
    font-weight: 700;
}
.bw-article-nav { display: none; }

.bw-article {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 48px;
    align-items: start;
}
.bw-article__body { min-width: 0; }
.bw-article__aside { position: sticky; top: calc(var(--header-h) + 24px); }

@media (min-width: 961px) {
    .bw-article__body > h1 { font-size: 2.5rem; }
}

.bw-article__meta {
    display: flex; flex-wrap: wrap; gap: 16px;
    color: var(--text-muted);
    font-size: var(--fs-small);
    margin: 0 0 24px;
}
.bw-article__meta dt { display: none; }
.bw-article__meta dd { margin: 0; }
.bw-article__meta-item { display: inline-flex; align-items: center; gap: 6px; }

.bw-article__hero {
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin: 24px 0 32px;
    box-shadow: var(--shadow-sm);
}
.bw-article__hero img { width: 100%; height: auto; }
.bw-article__hero-fallback {
    min-height: 180px;
    margin: 24px 0 32px;
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at 20% 20%, rgba(72, 94, 255, .16), transparent 38%),
        radial-gradient(circle at 80% 70%, rgba(128, 73, 168, .15), transparent 42%),
        var(--surface-muted);
}
.bw-article__footer {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    color: var(--text-muted);
    font-size: var(--fs-small);
}

/* === Lead === */
.bw-lead {
    font-size: 1.18rem;
    line-height: 1.55;
    color: var(--text);
    padding: 24px 28px;
    background: var(--surface-muted);
    border-left: 4px solid var(--blue);
    border-radius: var(--radius-md);
    margin: 0 0 32px;
}

/* === Body typography === */
.bw-content {
    font-size: var(--fs-body);
    line-height: var(--line-height-body);
}
.bw-content ul, .bw-content ol { padding-left: 1.4em; margin: 0 0 1.2em; }
.bw-content li { margin-bottom: 0.4em; }
.bw-content blockquote {
    margin: 1.5em 0;
    padding: 16px 22px;
    border-left: 3px solid var(--violet);
    background: var(--surface-muted);
    border-radius: var(--radius-sm);
    color: var(--graphite);
    font-style: italic;
}
.bw-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 1.5em 0;
    font-size: 0.95rem;
}
.bw-content th, .bw-content td {
    border: 1px solid var(--line);
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
}
.bw-content th { background: var(--surface-muted); font-weight: 600; }
.bw-content code {
    background: var(--surface-muted);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.92em;
}
.bw-content a.bago-glossary-link {
    color: var(--blue);
    text-decoration: underline;
    text-decoration-style: dotted;
    text-decoration-thickness: 1px;
}

/* === TOC === */
.bw-toc {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 20px 22px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}
.bw-toc__title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin: 0 0 12px;
}
.bw-toc ol { list-style: none; margin: 0; padding: 0; counter-reset: bw-toc; }
.bw-toc li {
    counter-increment: bw-toc;
    margin-bottom: 8px;
    transition: color .2s ease;
}
.bw-toc li::before {
    content: counter(bw-toc, decimal) ".";
    color: var(--text-muted);
    margin-right: 8px;
    font-variant-numeric: tabular-nums;
    transition: color .2s ease;
}
.bw-toc a {
    text-decoration: none;
    color: var(--text);
    transition: color .2s ease;
}
.bw-toc a:hover { color: var(--blue); }
.bw-toc li.is-active::before {
    color: var(--blue);
}
.bw-toc li.is-active > a {
    color: var(--blue);
    font-weight: 600;
}
.bw-toc__l2 { padding-left: 16px; font-size: 0.92rem; color: var(--text-muted); }

@media (prefers-reduced-motion: reduce) {
    .bw-toc li,
    .bw-toc li::before,
    .bw-toc a { transition: none; }
}

/* === Facts === */
.bw-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin: 32px 0;
    padding: 0;
    list-style: none;
}
.bw-facts__item {
    --accent: #9C7BFF;
    --accent-soft: rgba(156,123,255,.20);
    --accent-dot: rgba(156,123,255,.34);
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: grid;
    align-content: start;
    min-height: 230px;
    padding: 24px;
    background: linear-gradient(180deg, rgba(255,255,255,.94), rgba(251,251,251,.9));
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(10px);
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease, opacity .6s ease;
}
.bw-facts__item::before,
.bw-facts__item::after {
    content: "";
    position: absolute;
    z-index: 0;
    border-radius: 50%;
    pointer-events: none;
}
.bw-facts__item::before {
    right: -42px;
    bottom: -48px;
    width: 132px;
    height: 132px;
    background: radial-gradient(circle at center, var(--accent-soft), rgba(255,255,255,0) 58%);
    opacity: .95;
}
.bw-facts__item::after {
    top: 18px;
    right: 18px;
    width: 52px;
    height: 52px;
    background: radial-gradient(circle at center, var(--accent-dot), rgba(255,255,255,0) 65%);
    opacity: .8;
}
.bw-facts__item:hover {
    transform: translateY(-4px);
    border-color: #dfdfdf;
    box-shadow: var(--shadow-md);
}
.bw-facts__item.reveal {
    opacity: 0;
    transform: translateY(18px);
}
.bw-facts__item.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.bw-facts__text {
    position: relative;
    z-index: 1;
    max-width: 30ch;
    font-size: 1rem;
    line-height: 1.58;
}
.bw-facts__num {
    display: block;
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--blue);
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 6px;
}
.bw-facts__txt { color: var(--text-muted); font-size: 0.95rem; }

/* === FAQ === */
.bw-faq { margin: 32px 0; }
.bw-faq__item {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    margin-bottom: 12px;
    overflow: hidden;
}
.bw-faq__q {
    width: 100%;
    text-align: left;
    border: none;
    background: transparent;
    padding: 18px 24px;
    font-family: inherit;
    font-size: 1.02rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}
.bw-faq__q::after {
    content: "+";
    color: var(--blue);
    font-size: 1.4rem;
    line-height: 1;
}
.bw-faq__item[open] .bw-faq__q::after { content: "−"; }
.bw-faq__a {
    padding: 0 24px 20px;
    color: var(--graphite);
}

/* === Citation === */
.bw-citation {
    margin: 32px 0;
    padding: 28px;
    background: linear-gradient(135deg, var(--surface-muted), var(--surface));
    border: 1px solid var(--line);
    border-left: 4px solid var(--violet);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}
.bw-citation__label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--violet);
    font-weight: 600;
    margin-bottom: 12px;
}
.bw-citation__quote {
    font-size: 1.1rem;
    line-height: 1.55;
    color: var(--text);
    margin: 0;
}
.bw-citation__author { color: var(--text-muted); font-size: 0.92rem; margin-top: 16px; }

/* === Related === */
.bw-related { margin: 48px 0 0; }
.bw-related__title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin: 0 0 16px;
}
.bw-related__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}
.bw-related__card {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 20px 22px;
    background: var(--surface);
    text-decoration: none;
    color: var(--text);
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
.bw-related__card:hover {
    border-color: var(--blue);
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}
.bw-related__card-title { font-weight: 600; margin: 0 0 6px; line-height: 1.3; }
.bw-related__card-lead { color: var(--text-muted); font-size: 0.92rem; margin: 0; }

/* === Article rubrics === */
.bw-rubric-list { display: grid; gap: 56px; }
.bw-rubric__title {
    margin: 0 0 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
    font-size: 1.35rem;
}
.bw-brand-rubric__head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(180px, 18vw, 240px) minmax(0, 1fr);
    grid-template-areas: "title logo .";
    align-items: end;
    gap: clamp(28px, 5vw, 72px);
    min-height: 170px;
    margin: 0 0 18px;
    padding: 0 0 18px;
    border-bottom: 1px solid var(--line);
}
.bw-brand-rubric__head .bw-rubric__title {
    grid-area: title;
    margin: 0;
    padding: 0;
    border: 0;
}
.bw-brand-logo {
    margin: 0;
}
.bw-brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.bw-brand-logo--rubric {
    grid-area: logo;
    justify-self: center;
    width: clamp(180px, 18vw, 240px);
    height: 150px;
}
.bw-brand-logo--article {
    width: clamp(180px, 18vw, 240px);
    height: 150px;
    margin: 0 auto clamp(28px, 4vw, 44px);
}

/* === Search results === */
.bw-search-results {
    width: min(100%, 920px);
    margin: 56px auto 0;
}
.bw-search-results > h1 { margin-bottom: 28px; }
.bw-search-page label {
    display: block;
    margin-bottom: 10px;
    color: var(--text-muted);
    font-size: .85rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.bw-search-page__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
}
.bw-search-page input {
    min-width: 0;
    width: 100%;
    padding: 17px 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    outline: none;
    background: rgba(255, 255, 255, .9);
    color: var(--text);
    font: 600 clamp(1.2rem, 2.4vw, 1.65rem)/1.25 var(--font-sans);
    transition: border-color .2s ease, box-shadow .2s ease;
}
.bw-search-page input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(111, 168, 255, .16);
}
.bw-search-page button {
    padding: 0 24px;
    border: 1px solid var(--blue);
    border-radius: var(--radius-md);
    background: var(--blue);
    color: #fff;
    font: 600 1rem var(--font-sans);
    cursor: pointer;
    transition: filter .2s ease, transform .2s ease;
}
.bw-search-page button:hover { filter: brightness(.94); }
.bw-search-page button:active { transform: translateY(1px); }
.bw-search-results__summary {
    margin: 28px 0 0;
    color: var(--text-muted);
}
.bw-search-list {
    margin: 20px 0 0;
    padding-left: 2.25rem;
}
.bw-search-result {
    padding: 26px 0 28px 8px;
    border-bottom: 1px solid var(--line);
}
.bw-search-result::marker {
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}
.bw-search-result h2 {
    margin: 0 0 9px;
    font-size: clamp(1.18rem, 2vw, 1.45rem);
}
.bw-search-result h2 a {
    color: var(--text);
    text-decoration: none;
}
.bw-search-result h2 a:hover { color: var(--blue); }
.bw-search-result p {
    max-width: 74ch;
    margin: 0;
    color: var(--text-muted);
    line-height: 1.62;
}
.bw-search-empty {
    margin-top: 28px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    color: var(--text-muted);
}
.bw-search-empty p { margin: 0; }
.bw-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 36px;
}
.bw-pagination ol {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.bw-pagination a,
.bw-pagination__ellipsis {
    display: inline-grid;
    min-width: 38px;
    min-height: 38px;
    place-items: center;
    padding: 7px 11px;
    border-radius: var(--radius-pill);
    color: var(--text);
    text-decoration: none;
}
.bw-pagination a:hover { background: var(--surface-muted); color: var(--blue); }
.bw-pagination a[aria-current="page"] {
    background: var(--blue);
    color: #fff;
    font-weight: 700;
}
.bw-pagination__direction {
    border: 1px solid var(--line);
    font-weight: 600;
}

@media (max-width: 640px) {
    .bw-brand-rubric__head {
        grid-template-columns: 1fr;
        grid-template-areas:
            "logo"
            "title";
        justify-items: center;
        gap: 22px;
        min-height: 0;
        padding-bottom: 24px;
        text-align: center;
    }
    .bw-brand-logo--rubric,
    .bw-brand-logo--article {
        width: min(60vw, 220px);
        height: 138px;
    }
    .bw-brand-logo--rubric {
        justify-self: center;
    }
    .bw-brand-logo--article {
        margin-right: auto;
        margin-left: auto;
    }
    .bw-search-results { margin-top: 32px; }
    .bw-search-page__row { grid-template-columns: 1fr; }
    .bw-search-page button { min-height: 50px; }
    .bw-search-list { padding-left: 1.75rem; }
    .bw-search-result { padding-left: 2px; }
    .bw-pagination { justify-content: flex-start; }
}

/* === Sources === */
.bw-sources { margin: 48px 0 0; padding: 24px 28px; background: var(--surface-muted); border-radius: var(--radius-md); }
.bw-sources__title { margin: 0 0 12px; font-size: 0.95rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }
.bw-sources ol { padding-left: 1.4em; margin: 0; }
.bw-sources a { color: var(--blue); word-break: break-word; }

/* === Section / Brands grid (homepage, sections) === */
.bw-hero {
    padding: 56px 0 32px;
    text-align: left;
}
.bw-hero__eyebrow {
    color: var(--blue);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.78rem;
    font-weight: 600;
    margin: 0 0 12px;
}
.bw-hero__lead {
    color: var(--graphite);
    font-size: 1.2rem;
    max-width: 60ch;
    line-height: 1.55;
}

.bw-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin: 32px 0;
}
.bw-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 24px;
    background: var(--surface);
    text-decoration: none;
    color: var(--text);
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
.bw-card:hover {
    border-color: var(--blue);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.bw-card__title { font-size: 1.15rem; font-weight: 600; margin: 0; line-height: 1.3; }
.bw-card__lead { color: var(--text-muted); font-size: 0.95rem; margin: 0; }
.bw-card__meta { color: var(--text-muted); font-size: 0.82rem; margin-top: auto; }
.bw-card__stub { display: inline-block; padding: 2px 10px; background: var(--surface-muted); color: var(--text-muted); font-size: 0.75rem; border-radius: var(--radius-pill); }

.bw-brand-card { border-top: 4px solid var(--blue); }
.bw-brand-card__logo { width: 56px; height: 56px; object-fit: contain; }

/* === Coming soon (EN stub) === */
.bw-coming-soon {
    padding: 18px 22px;
    background: rgba(255, 201, 77, 0.15);
    border: 1px solid var(--yellow);
    border-radius: var(--radius-md);
    margin: 0 0 24px;
    color: var(--text);
    font-size: 0.95rem;
}

/* === Glossary index === */
.bw-glossary__nav {
    display: flex; flex-wrap: wrap; gap: 8px;
    margin: 0 0 24px;
    padding: 0;
    list-style: none;
}
.bw-glossary__nav a {
    display: inline-block;
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    font-size: 0.9rem;
}
.bw-glossary__nav a:hover { background: var(--blue); color: #fff; border-color: var(--blue); }
.bw-glossary__group { margin-bottom: 32px; }
.bw-glossary__letter { font-size: 1.4rem; margin: 0 0 12px; color: var(--blue); }
.bw-glossary__list { list-style: none; padding: 0; margin: 0; }
.bw-glossary__term { padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.bw-glossary__term a { text-decoration: none; font-weight: 600; }
.bw-glossary__term-def { color: var(--text-muted); font-size: 0.92rem; margin-top: 4px; }

/* === Responsive article === */
@media (max-width: 960px) {
    .bw-page-shell { display: block; }
    .bw-sidebar { display: none; }
    .bw-article { grid-template-columns: 1fr; gap: 24px; }
    .bw-article__aside { position: static; }
    .bw-article-nav {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        margin-top: 40px;
        padding-top: 22px;
        border-top: 1px solid var(--line);
    }
    .bw-article-nav__link,
    .bw-article-nav__empty {
        min-width: 0;
        min-height: 54px;
    }
    .bw-article-nav__link {
        display: grid;
        align-items: center;
        gap: 8px;
        color: var(--text);
        font-size: .88rem;
        font-weight: 600;
        line-height: 1.3;
        text-decoration: none;
    }
    .bw-article-nav__link > span:not([aria-hidden]) {
        display: -webkit-box;
        overflow: hidden;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
    }
    .bw-article-nav__link--previous {
        grid-template-columns: auto minmax(0, 1fr);
        padding-right: 16px;
    }
    .bw-article-nav__link--next {
        grid-template-columns: minmax(0, 1fr) auto;
        padding-left: 16px;
        border-left: 1px solid var(--line);
        text-align: right;
    }
    .bw-article-nav__empty + .bw-article-nav__link--next {
        border-left: 0;
    }
}

/* End */
/* /local/templates/bago_wiki/assets/tokens.css?17847873001839 */
/* /local/templates/bago_wiki/assets/template_styles.css?178489930414580 */
/* /local/templates/bago_wiki/assets/styles.css?178530691221092 */
