@font-face {
    font-family: "Brutal Type";
    src: url("/assets/fonts/BrutalType/BrutalType-Regular.woff2") format("woff2");
    font-weight: 400;
}
@font-face {
    font-family: "Brutal Type";
    src: url("/assets/fonts/BrutalType/BrutalType-Medium.woff2") format("woff2");
    font-weight: 500 700;
}

body.docs-shell-page,
body.docs-shell-page button,
body.docs-shell-page input,
body.docs-shell-page textarea,
body.docs-shell-page select {
    font-family: "Brutal Type", Arial, sans-serif !important;
}
body.docs-shell-page { padding-top: 72px; }

body.docs-shell-page > .container {
    display: flex;
    width: auto;
    max-width: 1440px;
    margin: 2rem auto;
    padding: 0 2rem;
    gap: 2rem;
}

.docs-site-header-host {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    height: 72px;
    z-index: 10000;
    display: block;
    background: #fff;
}

.docs-site-footer { position: relative; z-index: 2; }
.docs-site-footer .container {
    width: 1200px;
    max-width: none;
    padding: 0;
    margin: 0 auto;
}
.docs-site-footer.footer {
    width: 100%;
    margin: 0;
    border: 0;
    border-radius: 0;
    line-height: normal;
}

.top-navbar { display: none !important; }
.mobile-nav-overlay, .mobile-nav-menu { display: none !important; }

.docs-primary-menu {
    margin-bottom: .75rem;
    padding: .65rem;
    border: 1px solid var(--border-light, #eee);
    border-radius: 0;
    background: var(--card, #fff);
}
.docs-primary-menu__title {
    padding: .4rem .65rem .55rem;
    color: var(--text-muted, #9ca3af);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.docs-primary-menu a,
.docs-primary-menu__disabled {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: .7rem .75rem;
    border-radius: 0;
    color: var(--text-secondary, #6b7280);
    font-size: .88rem;
    font-weight: 600;
    text-decoration: none;
}
.docs-primary-menu__disabled {
    justify-content: space-between;
    color: #a0a0a0;
    background: #ededed;
    cursor: not-allowed;
}
.docs-primary-menu__disabled small {
    font-size: .68rem;
    font-weight: 500;
    text-transform: uppercase;
}
.docs-primary-menu a:hover { color: var(--text, #1a1a1a); background: var(--bg-secondary, #f0efe9); }
.docs-primary-menu a.active { color: #1a1a1a; background: #ffd73d; }
.docs-primary-menu .docs-sidebar-search {
    width: 100%;
    justify-content: flex-start;
    margin-top: .45rem;
    border-radius: 0;
}

/* Геометрия документации повторяет прямые блоки основного сайта. */
.docs-shell-page .sidebar-group,
.docs-shell-page .sidebar-group-header,
.docs-shell-page .sidebar a,
.docs-shell-page .card,
.docs-shell-page .hero,
.docs-shell-page .image-card,
.docs-shell-page .image-card img,
.docs-shell-page .main-screen-preview,
.docs-shell-page .status-card,
.docs-shell-page .cal-slider,
.docs-shell-page .info-box,
.docs-shell-page .warning-box,
.docs-shell-page .search-trigger {
    border-radius: 0 !important;
}
.docs-primary-menu .docs-sidebar-search .search-trigger-text { display: inline; }

.sidebar-inner {
    position: static !important;
    max-height: none !important;
    overflow-y: visible !important;
}
.sidebar {
    position: sticky;
    top: 98px;
    max-height: calc(100vh - 114px);
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
}

.docs-integration-sidebar {
    position: fixed;
    top: 98px;
    left: max(32px, calc((100% - 1440px) / 2 + 32px));
    z-index: 10001;
    width: 250px;
}
.docs-integration-page { background: #f8f7f4 !important; color: #151515 !important; }
.docs-integration-page .dev-overlay {
    position: relative !important;
    inset: auto !important;
    min-height: 610px;
    margin-left: 304px;
    background: #f8f7f4 !important;
    color: #151515 !important;
}
.docs-integration-page .dev-overlay h2 { color: #151515 !important; }
.docs-integration-page .dev-overlay p { color: #808080 !important; }
.docs-integration-page .dev-overlay-icon { background: #fff !important; border-color: #e5e5e0 !important; }
.docs-integration-page .dev-overlay a { background: #ffd73d !important; color: #151515 !important; }
.docs-integration-page > .screen,
.docs-integration-page > .finish-fab,
.docs-integration-page > .flow-board,
.docs-integration-page > .fmain { display: none !important; }

.hero-logo img { width: auto; max-width: 190px; height: auto !important; object-fit: contain; }
.image-card img, .main-screen-image img, .status-card img { max-width: 100%; height: auto; }

@media (max-width: 1280px) {
    .docs-site-footer .container { width: 95%; }
}

@media (max-width: 900px) {
    body.docs-shell-page > .container { width: 100%; margin: 1rem auto; padding: 0 1rem; gap: 1rem; }
    .sidebar { position: static; max-height: none; overflow: visible; }
    .docs-primary-menu { width: 100%; }
    .docs-integration-sidebar { position: static; width: auto; margin: 18px 4%; }
    .docs-integration-page .dev-overlay { min-height: 520px; margin-left: 0; padding: 24px; }
    .docs-site-footer .container { width: 92%; }
}

/* Единое hover-поведение желтых кнопок документации */
:is(
    .docs-primary-menu a.active,
    .sidebar a.active,
    .sidebar-group-header.active,
    .sidebar-group > a[data-target].active,
    .web-link.active,
    .scroll-to-top
) {
    background: var(--button-yellow, #FFD73D) !important;
    transition: background-color .25s ease, transform .25s ease, box-shadow .25s ease !important;
    transform-origin: center;
}

:is(
    .docs-primary-menu a.active,
    .sidebar a.active,
    .sidebar-group-header.active,
    .sidebar-group > a[data-target].active,
    .web-link.active,
    .scroll-to-top
):hover {
    background: var(--button-yellow-hover, #ffcc0a) !important;
    transform: scale(1.025) !important;
    box-shadow: var(--button-yellow-shadow, 0 10px 24px rgba(255, 204, 10, .34)) !important;
}
