/* Shared Header selector, scoped EN homepage UI closure, and RU presentation. */
.bevis-language { position: relative; align-self: center; font-size: 14px; }
.bevis-language summary { background: transparent; color: #111; font: inherit; -webkit-tap-highlight-color: transparent; display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 4px; cursor: pointer; list-style: none; white-space: nowrap; }
.bevis-language summary:hover { background: #f5f5f5; }
.bevis-language summary::selection, .bevis-language summary span::selection { background: #e8e8e8; color: #111; }
.bevis-language summary::-webkit-details-marker { display: none; }
.bevis-language__options { position: absolute; top: 100%; right: 0; min-width: 152px; padding: 6px; background: #fff; color: #111; border: 1px solid #e8e8e8; border-radius: 4px; z-index: 110; box-shadow: 0 8px 24px #0000000d; }
.bevis-language:not([open]) > .bevis-language__options { display: none; }
.bevis-language__options > a, .bevis-language__options > span { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 44px; padding: 8px 12px; font-size: 14px; line-height: 1.4; text-decoration: none; }
.bevis-language__options > [aria-current] { background: #f5f5f5; }
.bevis-language__options > a:hover { background: #f5f5f5; }
.bevis-language summary:focus-visible, .bevis-language a:focus-visible, html[lang^="ru"] [data-insight-filter]:focus-visible { outline: 2px solid #111; outline-offset: 3px; }
html[lang^="ru"] .insight-categories button { border: 0; background: transparent; padding: 8px 0; min-height: 44px; color: #666; font: inherit; font-size: 14px; line-height: 1.6; cursor: pointer; text-align: left; }
html[lang^="ru"] .insight-categories button[aria-pressed="true"] { color: #111; text-decoration: underline; text-underline-offset: 6px; }
html[lang^="ru"] .insight-card[hidden] { display: none; }
html[lang^="ru"] .taxonomy-archive__pagination .page-numbers { flex-wrap: wrap; }
html[lang^="ru"] .taxonomy-archive__pagination a, html[lang^="ru"] .taxonomy-archive__pagination span.page-numbers { min-width: 44px; min-height: 44px; }
@media (max-width: 980px) {
    /* Keep the language control reachable after opening a long mega menu. */
    .primary-nav.is-open { max-height: calc(100dvh - 70px); overflow-y: auto; overscroll-behavior: contain; grid-auto-rows: max-content; align-content: start; }
    .primary-nav .nav-item > [data-mega-trigger] { height: auto; }
    .bevis-language { align-self: auto; border-top: 1px solid #e8e8e8; margin-top: 8px; padding-top: 4px; }
    .bevis-language summary { width: max-content; min-height: 46px; }
    .bevis-language__options { position: static; width: min(100%, 240px); box-shadow: none; margin-bottom: 6px; }
}

/* Decorative 100px images plus rotation/outsets need more than 1100px. */
@media (max-width: 1100px) {
    html[lang^="en"] .home .about-band__accent { display: none; }
}

/* RU mobile copy is taller: flow sections instead of fixed absolute offsets. */
@media (max-width: 640px) {
    html[lang^="ru"] .site-footer,
    html[lang^="ru"] .site-footer__inner { height: auto; }
    html[lang^="ru"] .site-footer__top { display: flex; flex-direction: column; gap: 40px; height: auto; flex-basis: auto; }
    html[lang^="ru"] .site-footer__brand,
    html[lang^="ru"] .site-footer__pages,
    html[lang^="ru"] .site-footer__contact { position: static; }
}

/* RU homepage: preserve copy/media; let translated text determine its layout. */
html[lang^="ru"] .bevis-ru-home .hero__content { width: min(980px, calc(100% - 48px)); padding-block: 48px; }
html[lang^="ru"] .bevis-ru-home #hero-title { font-size: clamp(36px, 4.3vw, 62px); font-weight: 500; line-height: 1.08; letter-spacing: -.025em; }
html[lang^="ru"] .bevis-ru-home .ru-home-hero__title { display: block; text-wrap: balance; }
html[lang^="ru"] .bevis-ru-home .ru-home-hero__support { display: block; margin-top: 22px; font-size: clamp(20px, 2.1vw, 28px); font-weight: 400; line-height: 1.4; letter-spacing: 0; }
html[lang^="ru"] .bevis-ru-home .hero__content > p { max-width: 680px; margin: 20px auto 28px; font-size: 16px; line-height: 1.6; text-wrap: balance; }
html[lang^="ru"] .bevis-ru-home .about-band .section-heading--wide { max-width: 1120px; padding-inline: 140px; }
html[lang^="ru"] .bevis-ru-home .about-band .section-label { font-size: 14px; text-wrap: balance; }
html[lang^="ru"] .bevis-ru-home .about-band .section-heading h2 { width: 100%; max-width: 100%; font-size: clamp(28px, 3.2vw, 44px); line-height: 1.2; letter-spacing: -.02em; transform: none; text-wrap: balance; }
html[lang^="ru"] .bevis-ru-home .about-band .section-heading h2 span { display: block; white-space: normal; }
html[lang^="ru"] .bevis-ru-home .about-band__accent--left { left: 12px; }
html[lang^="ru"] .bevis-ru-home .about-band__accent--right { right: 12px; }
html[lang^="ru"] .bevis-ru-home .projects .projects-selector { height: auto; align-items: stretch; }
html[lang^="ru"] .bevis-ru-home .projects .projects-selector__tabs { height: auto; }
html[lang^="ru"] .bevis-ru-home .projects .projects-selector__tabs button { height: auto; min-height: 128px; flex: 1 0 auto; padding: 20px 24px; font-family: inherit; }
html[lang^="ru"] .bevis-ru-home .projects .projects-selector__tabs strong { margin-bottom: 8px; font-size: 24px; line-height: 1.25; }
html[lang^="ru"] .bevis-ru-home .projects .projects-selector__tabs span { font-size: 16px; line-height: 1.5; }
/* The first Russian process title is wider than the fixed EN column. Let the
   two text columns share available width and wrap naturally without collision. */
@media (min-width: 981px) {
    html[lang^="ru"] .bevis-ru-home .process-list article { grid-template-columns: 32px minmax(0, 1fr) minmax(0, 1.7fr); }
    html[lang^="ru"] .bevis-ru-home .process-list h3 { width: auto; white-space: normal; transform: none; text-wrap: balance; }
    html[lang^="ru"] .bevis-ru-home .process-list p { width: 100%; }
}
@media (max-width: 1199px) {
    html[lang^="ru"] .bevis-ru-home .about-band .section-heading--wide { padding-inline: 0; max-width: 900px; }
    html[lang^="ru"] .bevis-ru-home .about-band__accent { display: none; }
}
@media (max-width: 640px) {
    html[lang^="ru"] .bevis-ru-home .hero__content { width: calc(100% - 32px); padding-block: 40px; }
    html[lang^="ru"] .bevis-ru-home .about-band .section-heading h2 span { display: inline; }
    html[lang^="ru"] .bevis-ru-home #hero-title { font-size: 30px; line-height: 1.12; }
    html[lang^="ru"] .bevis-ru-home .ru-home-hero__support { margin-top: 18px; font-size: 18px; }
    html[lang^="ru"] .bevis-ru-home .hero__content > p { margin: 18px auto 24px; font-size: 14px; }
    html[lang^="ru"] .bevis-ru-home .projects .projects-selector__tabs button { min-height: 104px; padding: 18px; }
    html[lang^="ru"] .bevis-ru-home .projects .projects-selector__tabs strong { font-size: 21px; }
    html[lang^="ru"] .bevis-ru-home .projects .projects-selector__tabs span { font-size: 15px; }
}
