/*
 * Responsive layer for the restored 2015 beta interface.
 *
 * The historical desktop stylesheet remains byte-for-byte intact.  Every
 * override for existing UI is scoped below 1024px so the 940px desktop canvas
 * keeps its original geometry.  The few unscoped declarations only hide new
 * mobile-only controls on desktop and make new structural wrappers clear their
 * existing floated children.
 */

.mobile-nav-toggle,
.mobile-filter-toggle,
.mobile-scroll-hint {
  display: none;
}

.profile-body-layout:before,
.profile-body-layout:after {
  content: "";
  display: table;
}

.profile-body-layout:after {
  clear: both;
}

@media (max-width: 1023px) {
  html {
    min-width: 0;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  body {
    min-width: 0;
    overflow-x: hidden;
  }

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

  .page,
  .page.page_volunteer {
    width: 100%;
    min-width: 0;
    min-height: 100vh;
    overflow: visible;
  }

  .constrain,
  .page_volunteer .constrain {
    width: auto;
    max-width: none;
    margin-right: 24px;
    margin-left: 24px;
  }

  .container,
  .page_volunteer .container,
  .page_errors .container {
    width: 100%;
    margin: 0;
    min-height: 0;
  }

  .content,
  .content-right,
  .aside,
  .user-profile-content,
  .user-card,
  .wfilter {
    float: none;
    width: 100%;
  }

  img,
  svg,
  video,
  canvas,
  iframe {
    max-width: 100%;
  }

  img,
  video {
    height: auto;
  }

  .normalize,
  .news-article,
  .opinion .normalize,
  .opinion .clearfix,
  .opinion-detail,
  .candidate-detail__text,
  .wopinion .info__text,
  .comments-item__text,
  .comments-item_new .comments-item__text,
  .comments-item_child .comments-item__text,
  .election__text,
  .volunteer-head .text,
  .volunteer-example .text {
    width: auto;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-wrap: break-word;
  }

  /* Header and navigation */
  .header,
  .page_index .header,
  .page_volunteer .header {
    position: relative;
    z-index: 100;
    width: 100%;
    height: auto;
    margin: 0;
  }

  .header__container,
  .page_volunteer .header__container {
    position: relative;
    top: auto !important;
    left: auto;
    width: 100%;
    height: auto;
    margin-top: 0 !important;
  }

  .header__top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand toggle"
      "search search"
      "account account";
    align-items: center;
    gap: 16px;
    height: auto;
    min-height: 0;
    padding-top: 18px;
    padding-bottom: 18px;
  }

  .header__top > a:first-of-type {
    grid-area: brand;
    display: inline-block;
    width: min(280px, 72vw);
    line-height: 0;
  }

  .header .img-logo {
    position: static;
    top: auto;
    left: auto;
    display: block;
    width: 100%;
    max-width: 280px;
  }

  .header .i18plus {
    top: 8px;
    left: 4px;
    z-index: 2;
    transform: scale(.78);
    transform-origin: 0 0;
  }

  .mobile-nav-toggle {
    grid-area: toggle;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 1px solid #1cbbb4;
    border-radius: 2px;
    background: #fff;
    color: #393939;
    cursor: pointer;
  }

  .mobile-nav-toggle__icon,
  .mobile-nav-toggle__icon:before,
  .mobile-nav-toggle__icon:after {
    position: absolute;
    display: block;
    width: 24px;
    height: 2px;
    background: #1cbbb4;
    content: "";
    transition: transform .2s ease, top .2s ease, opacity .2s ease;
  }

  .mobile-nav-toggle__icon:before {
    top: -8px;
  }

  .mobile-nav-toggle__icon:after {
    top: 8px;
  }

  .mobile-nav-open .mobile-nav-toggle__icon {
    background: transparent;
  }

  .mobile-nav-open .mobile-nav-toggle__icon:before {
    top: 0;
    transform: rotate(45deg);
  }

  .mobile-nav-open .mobile-nav-toggle__icon:after {
    top: 0;
    transform: rotate(-45deg);
  }

  .header__search {
    grid-area: search;
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
  }

  .header__search form {
    display: flex;
    width: 100%;
  }

  .header__search input[type="text"] {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    height: 47px;
    padding-right: 12px;
    font-size: 16px;
  }

  .header__search .btn,
  .header__search.focus .btn {
    position: static;
    display: inline-flex;
    flex: 0 0 54px;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 47px;
    margin: 0 0 0 -1px;
  }

  .header__btns {
    grid-area: account;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 14px;
    float: none;
    width: 100%;
    padding-top: 0;
    text-align: left;
  }

  .header__btns > div,
  .header__btns .mb15,
  .header__btns .mb20 {
    margin-bottom: 0 !important;
  }

  .header__btns .easy-button,
  .header__btns .btn,
  .header__btns .legacy-link-button {
    min-height: 44px;
  }

  .header__profile .profile-option {
    right: auto;
    left: 0;
    z-index: 150;
    min-width: min(260px, calc(100vw - 48px));
  }

  .header__profile .link,
  .header__profile .legacy-link-button {
    display: flex;
    align-items: center;
    min-height: 44px;
    width: 100%;
  }

  .header__nav {
    display: none;
    height: auto;
    max-height: calc(100vh - 72px);
    overflow-y: auto;
    background: #393939;
    -webkit-overflow-scrolling: touch;
  }

  .mobile-nav-open .header__nav {
    display: block;
  }

  .header__nav .constrain {
    margin: 0;
  }

  .header__nav .table,
  .header__nav tbody,
  .header__nav tr,
  .header__nav .td {
    display: block;
    width: 100%;
    height: auto;
  }

  .header__nav .td {
    padding: 0;
    border-bottom: 1px solid #505050;
    text-align: left;
  }

  .header__nav .td:last-child {
    border-bottom: 0;
  }

  .header__nav .link {
    display: flex;
    align-items: center;
    min-height: 52px;
    padding: 10px 24px;
    font-size: 17px;
  }

  .mobile-nav-open {
    overflow: hidden;
  }

  .b-progress-steps {
    display: none;
  }

  /* Footer */
  .footer {
    position: static;
    bottom: auto;
    left: auto;
    width: 100%;
    height: auto;
    min-height: 0;
    padding: 42px 0 calc(36px + env(safe-area-inset-bottom));
    font-size: 14px;
  }

  .footer .column,
  .footer .column_first,
  .footer .column_middle,
  .footer .column_last {
    display: block;
    width: 100%;
    min-height: 0;
    margin: 0;
    padding: 0;
    font-size: 14px;
  }

  .footer .column_middle:before,
  .footer .column_middle:after {
    display: none;
  }

  .footer__section,
  .footer__nav {
    margin: 0 0 28px;
  }

  .footer__section .link,
  .footer__nav .link {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 6px 0;
  }

  .footer__note {
    margin-bottom: 30px;
  }

  /* Shared page primitives */
  .header__block,
  .footer__block {
    width: 100%;
    max-width: 100%;
  }

  .header__block:empty,
  .footer__block:empty {
    display: none;
  }

  .mini-head {
    min-height: 44px;
    padding-top: 12px;
  }

  .mini-head__title {
    max-width: calc(100% - 16px);
    overflow-wrap: anywhere;
  }

  .main-title-page,
  .main-header .title,
  .news-name,
  .tile-widgets-title,
  .election__title,
  .volunteer-head .title,
  .volunteer-caption .title {
    font-size: clamp(26px, 7vw, 36px);
    line-height: 1.15;
    overflow-wrap: anywhere;
  }

  .block-title,
  .small-title,
  .timeline__title,
  .opinion-title,
  .news-story__name {
    overflow-wrap: anywhere;
  }

  .paginator {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .paginator .prev,
  .paginator .next {
    float: none;
  }

  .paginator .item {
    min-width: 34px;
    min-height: 34px;
  }

  .sort-by {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    margin-bottom: 20px;
  }

  .sort-by .sort-title,
  .sort-by .sort-var {
    float: none;
    margin: 0;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
  }

  .tag-list,
  .share-btn,
  .small-soc-links {
    max-width: 100%;
  }

  .share-btn {
    float: none !important;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 18px 0;
  }

  .share-btn .share-link,
  .small-soc-links .soc-link {
    min-width: 35px;
    min-height: 35px;
  }

  /* Home tiles */
  .tile-widgets {
    width: 100%;
    margin: 0;
  }

  .tile-widgets .row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    width: 100%;
    margin: 0 0 20px;
    white-space: normal;
  }

  .tile-widgets .cell,
  .tile-widgets .cell_lg,
  .tile-widgets .cell_sm {
    display: block;
    width: 100%;
    height: auto;
    min-width: 0;
    padding: 0;
  }

  .tile-widgets .cell_lg,
  .tile-widgets .cell:has(.tw-block_news-line) {
    grid-column: 1 / -1;
  }

  .tw-block,
  .tw-block_sm,
  .tw-block_person-sm,
  .tw-block_news-line {
    width: 100%;
    max-width: 100%;
  }

  .tw-block-title,
  .tw-block-note,
  .tw-block-avatart {
    opacity: 1 !important;
  }

  .tw-block .tw-hover {
    display: none;
  }

  .tw-news-line {
    margin-right: 0;
  }

  .tw-news-line .scroll {
    width: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .tw-news-line .item {
    width: 100%;
    max-width: 100%;
  }

  .index-section {
    padding-right: 0;
    padding-left: 0;
  }

  .index-section__region,
  .index-section .readmore {
    position: static;
    margin-top: 18px;
  }

  /* Filters and forms */
  .wfilter {
    position: relative;
    margin-bottom: 24px;
  }

  .mobile-filter-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 48px;
    padding: 10px 14px;
    border: 1px solid #393939;
    background: #393939;
    color: #fff;
    font: 700 15px 'Open Sans', Arial, sans-serif;
    text-align: left;
    cursor: pointer;
  }

  .mobile-filter-toggle:after {
    content: "+";
    margin-left: 12px;
    color: #1cbbb4;
    font-size: 24px;
    font-weight: 400;
    line-height: 1;
  }

  .mobile-filter-toggle[aria-expanded="true"]:after {
    content: "−";
  }

  .js-mobile-ready .wfilter.mobile-filter-collapsed .wfilter__container {
    display: none;
  }

  .wfilter__caption {
    display: none;
  }

  .wfilter__container {
    width: 100%;
    padding: 18px 14px;
    border: 1px solid #d4d4d4;
    border-top: 0;
  }

  .wfilter__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .wfilter__tabs .easy-button,
  .wfilter__tabs .btn-org {
    flex: 1 1 120px;
    float: none;
    width: auto;
    min-height: 44px;
  }

  .wfilter__fields .field__left,
  .wfilter__fields .field__right {
    float: none;
    width: 100%;
  }

  .wfilter__fields .input-wrap {
    display: block;
    width: 100%;
    margin: 0 0 10px;
  }

  .wfilter__alphabet .list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(40px, 1fr));
    width: 100%;
  }

  .wfilter__alphabet .item {
    width: auto;
    min-width: 40px;
    height: 44px;
  }

  .wfilter__reset {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  .fields-small textarea,
  .fields-small input[type="text"],
  .fields-small input[type="email"],
  .fields-small input[type="url"],
  .fields-small input[type="password"],
  .fields-small input[type="number"],
  .fields-small select,
  .field textarea,
  .field input[type="text"],
  .field input[type="email"],
  .field input[type="url"],
  .field input[type="password"],
  .field input[type="number"],
  .field select,
  .add-promise input[type="text"],
  .profile-edit input,
  .profile-edit textarea,
  .volunteer-form input,
  .volunteer-form textarea,
  .volunteer-form select {
    width: 100% !important;
    max-width: 100%;
    min-height: 44px;
    font-size: 16px;
  }

  textarea {
    min-height: 120px;
  }

  .select2-container,
  .field .select2-container,
  .w-search .select2-container,
  .w-search select {
    width: 100% !important;
    max-width: 100%;
    min-width: 0;
  }

  .select2-drop,
  #select2-drop {
    max-width: calc(100vw - 24px) !important;
  }

  .field-range,
  .field-couple,
  .profile-edit .field-couple,
  .volunteer-form .field_couple {
    width: 100%;
  }

  .volunteer-form .field_couple-left {
    margin-right: 0;
  }

  .add-promise {
    min-height: 0;
  }

  .add-promise .stats {
    position: static;
    width: 100%;
    margin-top: 20px;
  }

  .add-promise__text {
    margin-right: 0;
  }

  .w-search .table,
  .w-search tbody,
  .w-search tr,
  .w-search td {
    display: block;
    width: 100%;
  }

  .w-search td {
    margin-bottom: 10px;
  }

  .w-search .td-min {
    display: none;
  }

  .w-search .btn {
    width: 100%;
    min-height: 48px;
  }

  /* Cards and list pages */
  .speech,
  .speech_min,
  .speech_news,
  .speech_horz-vote,
  .speech_trend {
    width: 100%;
    min-height: 0;
    padding: 30px 16px 18px;
  }

  .speech__content,
  .speech_news .info,
  .speech_promises .info,
  .speech_opinion .info,
  .speech_trend .info,
  .speech_opinion-big .info {
    width: auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
  }

  .speech__content .avatar-circle,
  .speech_news .avatar-circle,
  .speech_trend .avatar-circle {
    position: relative;
    top: auto;
    left: auto;
    display: block;
    margin: 0 auto 14px;
  }

  .speech__ctrl,
  .speech_min .speech__ctrl,
  .speech_horz-vote .speech__ctrl {
    position: static;
    width: 100%;
    margin: 18px 0 0;
  }

  .speech_news .date,
  .speech_news .news-date,
  .search-results__item .date {
    position: static;
    display: block;
    width: auto;
    margin: 12px 0 0;
    text-align: left;
  }

  .speech_news .info {
    display: block;
  }

  .speech_opinion .sub-title {
    padding-left: 0;
  }

  .speech_opinion .sub-title:after {
    display: none;
  }

  .speech-inline {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-right: 0;
  }

  .speech-inline__item {
    width: 100%;
    margin: 0;
  }

  .speech-inline__item .img {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
  }

  .speech-inline__item .status {
    bottom: 0;
    text-indent: 0;
  }

  .speech-inline__item .btn,
  .speech-inline__item .bvote {
    opacity: 1;
  }

  .filter-persons .row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
  }

  .filter-persons .item,
  .filter-persons .item:nth-child(4n),
  .filter-persons .wrap,
  .filter-persons .statistic {
    width: 100%;
    margin-right: 0;
  }

  .filter-persons .wrap,
  .filter-persons .statistic {
    height: auto;
    aspect-ratio: 1;
  }

  .search-results__item,
  .search-results__item_date {
    min-height: 0;
    padding: 42px 18px 18px;
  }

  .search-results__item .number {
    top: 12px;
    left: auto;
    right: 12px;
  }

  .search-results__item .section {
    left: 18px;
  }

  .search-results__item .avatar-circle {
    position: relative;
    top: auto;
    left: auto;
    display: block;
    margin: 0 0 14px;
  }

  .search-results__item_date:after {
    display: none;
  }

  /* Detail pages, profiles and timeline */
  .profile-status {
    height: auto;
    min-height: 86px;
    padding: 24px 12px 18px;
  }

  .profile-status:empty {
    min-height: 72px;
  }

  .profile-status .status-item {
    margin: 6px 8px;
  }

  .profile-main {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: center;
    gap: 12px 20px;
    min-height: 0;
    padding: 0 18px 22px;
    text-align: center;
  }

  .profile-main .view,
  .profile-main .info,
  .profile-main .statistic {
    display: block;
    float: none;
    width: 100%;
    margin: 0;
  }

  .profile-main .view {
    margin-top: -42px;
  }

  .profile-main .avatar-circle {
    margin-top: 0;
  }

  .profile-main .info {
    padding-top: 2px;
  }

  .profile-main .statistic {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 8px;
  }

  .profile-main .item {
    flex: 1 1 140px;
    width: auto;
    max-width: 220px;
    padding: 8px;
  }

  .profile-main .desc {
    text-align: center;
  }

  .profile-body-layout {
    display: flex;
    flex-direction: column;
    width: 100%;
  }

  .profile-body-layout .content {
    order: 1;
  }

  .profile-body-layout .aside-profile {
    order: 2;
    margin-top: 36px;
    padding-top: 30px;
    border-top: 1px solid #d7d7d7;
  }

  .aside-profile .item {
    margin-bottom: 30px;
  }

  .aside-profile .img,
  .wstory,
  .wstory-small,
  .wstory-big,
  .worganization,
  .wnews__scroll,
  .wnews__content,
  .wnews__item {
    width: 100%;
    max-width: 100%;
  }

  .wstory-big .wstory__link {
    display: block;
    width: 100%;
    min-height: 0;
  }

  .wstory-big .wstory__head,
  .wstory-big .wstory__info {
    display: block;
    width: 100%;
  }

  .wstory-big .wstory__head {
    min-height: 180px;
    padding: 24px;
  }

  .wstory-big .wstory__name {
    font-size: clamp(28px, 9vw, 40px);
    line-height: 1.1;
  }

  .wstory-big .wstory__info {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 24px;
    padding: 18px 20px;
  }

  .wstory-big .wstory__row {
    flex: 1 1 130px;
    margin: 0;
  }

  .wstory-big .wstory__title {
    width: auto;
    padding-right: 10px;
    text-align: left;
  }

  .worganization__container,
  .wnews__scroll {
    max-height: none;
  }

  .timeline {
    width: 100%;
  }

  .timeline__container {
    width: 100%;
    margin-left: 0;
    padding-left: 38px;
  }

  .timeline__container:before {
    left: 7px;
  }

  .timeline__head {
    min-height: 0;
    padding: 22px 16px;
  }

  .timeline__head:before {
    display: none;
  }

  .timeline__head:after {
    left: -31px;
    width: 31px;
  }

  .timeline__title {
    font-size: clamp(25px, 6.5vw, 36px);
    line-height: 1.2;
  }

  .timeline__ctrl {
    position: static;
    width: 100%;
    margin: 18px 0;
  }

  .timeline__event {
    position: relative;
    top: auto;
    left: auto;
    width: auto;
    max-width: 100%;
    margin: 18px 0 0;
    padding-left: 0;
  }

  .timeline__event:before {
    top: 3px;
    left: -40px;
  }

  .timeline__status {
    max-width: 100%;
  }

  .timeline .btn {
    max-width: 100%;
    padding: 15px 20px;
    white-space: normal;
  }

  .timeline .btn:after {
    left: -31px;
    width: 24px;
  }

  .timeline .normalize img,
  .news-article img,
  .opinion .normalize img {
    width: auto;
    max-width: 100%;
    height: auto !important;
  }

  .opinion-article .phrase {
    float: none;
    width: auto;
    margin: 18px 0;
  }

  .news-story__info .title {
    width: auto;
  }

  .news-timeline {
    margin-top: 30px;
  }

  .comments-item,
  .comments-item_new,
  .comments-item_child,
  .comments-item-parent > .comments-item_child,
  .comments-item-parent > .comments-item_new {
    margin-right: 0;
    margin-left: 0;
  }

  .comments-item__avatar {
    position: relative;
    top: auto;
    left: auto;
    float: left;
    margin: 0 12px 8px 0;
  }

  .comments-item__ctrl {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
  }

  .comments-item__autor-post,
  .comments-item__autor-date,
  .comments-item__autor-whom {
    margin-left: 0;
  }

  .comment-create textarea,
  .comments-item_new textarea {
    width: 100%;
    font-size: 16px;
  }

  .bvote,
  .bvote_horz,
  .wtrust .bvote,
  .wtrust .bvote_horz {
    max-width: 100%;
  }

  .bvote__action {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }

  .bvote-btn {
    min-width: 64px;
    min-height: 44px;
  }

  .slider-face {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
  }

  .wtrust {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    height: auto;
    margin-bottom: 24px;
  }

  .wtrust__link {
    position: relative;
    display: flex;
    flex-direction: column;
    grid-column: 1 / -1;
    width: 100%;
    overflow: visible;
  }

  .wtrust__opponenet-left,
  .wtrust__opponenet-right {
    position: relative;
    float: none;
    width: 100%;
    min-height: 132px;
    margin: 0;
    padding: 18px;
  }

  .wtrust__opponenet-right {
    border-top: 1px solid #393939;
    border-left: 0;
    transform: none;
  }

  .wtrust__wrap {
    display: block;
    transform: none;
  }

  .wtrust .avatar-circle {
    top: 18px;
    left: 18px;
  }

  .wtrust__info,
  .wtrust__info_trend {
    width: auto;
    min-height: 83px;
    margin: 0 0 0 102px;
    padding-left: 14px;
    line-height: normal;
  }

  .wtrust__info__link,
  .wtrust__phrase {
    display: block;
    width: auto;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .wtrust__vs {
    top: 50%;
    transform: translateY(-50%);
  }

  .wtrust__bvote,
  .wtrust__bvote_left,
  .wtrust__bvote_right {
    position: static;
    display: block;
    float: none;
    width: auto;
    height: auto;
    margin: 0;
    padding: 10px 6px 12px;
    border: 1px solid #393939;
    border-top: 0;
    border-radius: 0;
    text-align: center;
  }

  .wtrust__bvote_right {
    border-left: 0;
  }

  .wtrust__bvote::before {
    display: block;
    margin-bottom: 7px;
    color: #777;
    font-size: 11px;
    line-height: 1.2;
    text-transform: uppercase;
    content: "За первого";
  }

  .wtrust__bvote_right::before {
    content: "За второго";
  }

  .wtrust__bvote .bvote__action {
    display: flex;
    justify-content: center;
    gap: 6px;
    width: 100%;
    height: auto;
  }

  .wtrust .wtrust__bvote .bvote-btn,
  .wtrust .wtrust__bvote .bvote-btn_bottom {
    position: relative;
    inset: auto;
    flex: 0 0 58px;
    margin: 0;
  }

  .wtrust .wtrust__buttons {
    position: static;
    top: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
  }

  .wtrust__btn-left,
  .wtrust__btn-right {
    position: static;
    right: auto;
    left: auto;
    display: block;
    float: none;
    width: 100%;
  }

  .wtrust__btn,
  .wtrust__btn:active {
    position: static;
    bottom: auto;
    width: 100%;
    min-height: 44px;
  }

  .bvote-btn_wtrust {
    margin-right: 8px;
  }

  /* Elections and comparison */
  .election,
  .election-list .election,
  .election-list .election__link {
    width: 100%;
    height: auto;
    min-height: 0;
  }

  .election__title {
    line-height: 1.2;
  }

  .candidate__list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px 12px;
  }

  .candidate__item {
    width: 100%;
    margin: 0;
  }

  .candidate-detail {
    width: 100%;
    padding: 22px 18px;
  }

  .candidate-detail__statistic {
    display: flex;
    flex-wrap: wrap;
  }

  .candidate-detail__statistic .item {
    flex: 1 1 140px;
    width: auto;
  }

  .mobile-table-scroll {
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }

  .mobile-table-scroll .candidatetable {
    width: max-content;
    min-width: 720px;
  }

  .mobile-table-scroll .candidatetable .title {
    width: 160px;
    min-width: 160px;
  }

  .mobile-table-scroll .candidatetable tr > :first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #f4f5f5;
  }

  .mobile-table-scroll .candidatetable .title .green {
    background-color: #3f6e00;
  }

  .mobile-table-scroll .candidatetable .title .red {
    background-color: #a51f12;
  }

  .mobile-scroll-hint {
    display: block;
    margin: 0 0 8px;
    color: #666;
    font-size: 13px;
  }

  /* User profile */
  .user-card {
    margin-bottom: 24px;
  }

  .user-card .name {
    width: auto;
  }

  .user-profile-menu .table,
  .user-profile-menu tbody,
  .user-profile-menu tr,
  .user-profile-menu td {
    display: block;
    width: 100%;
  }

  .user-profile-menu .link {
    display: flex;
    align-items: center;
    min-height: 44px;
  }

  .user-profile-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .user-profile-filter .link {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    margin: 0;
  }

  .user-notice .item,
  .user-subscribe .item,
  .user-promises .item,
  .user-comments .item,
  .user-opinion .item {
    min-height: 0;
    padding-right: 16px;
    padding-left: 16px;
  }

  .user-subscribe .avatar-circle,
  .user-promises .avatar-circle,
  .user-notice .avatar {
    position: relative;
    top: auto;
    left: auto;
    display: inline-block;
    margin: 0 10px 8px 0;
  }

  .user-comments .bvote {
    position: static;
    margin: 10px 0;
  }

  /* Volunteers and editorial/public pages */
  .volunteer-head {
    padding: 38px 0;
  }

  .volunteer-head .img {
    position: static;
    display: block;
    max-height: 220px;
    margin: 24px auto -38px;
  }

  .volunteer-example .constrain {
    padding: 32px 0;
  }

  .volunteer-example .item,
  .volunteer-present .item {
    display: block;
    width: 100%;
    margin-bottom: 36px;
  }

  .volunteer-example .table {
    height: auto;
    margin-bottom: 18px;
  }

  .volunteer-example .cell {
    display: block;
  }

  .volunteer-form .content {
    width: 100%;
  }

  .editorial__item {
    padding-right: 0;
  }

  .editorial__item .contact {
    position: static;
    display: inline-block;
    margin: 10px 10px 0 0;
  }

  .errors-img {
    max-width: 60vw;
  }

  /* Fancybox and every AJAX fragment */
  .fancybox-wrap,
  .fancybox-popupwin,
  .fancybox-popupwin.fancybox-opened {
    right: auto !important;
    left: max(12px, env(safe-area-inset-left)) !important;
    width: calc(100vw - 24px - env(safe-area-inset-left) - env(safe-area-inset-right)) !important;
    max-width: calc(100vw - 24px) !important;
  }

  .fancybox-skin,
  .fancybox-outer,
  .fancybox-inner {
    width: 100% !important;
    max-width: 100% !important;
  }

  .fancybox-inner {
    max-height: calc(100vh - 48px) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  .fancybox-close {
    top: 4px !important;
    right: 4px !important;
    width: 44px !important;
    height: 44px !important;
    background-position: center !important;
  }

  .popup,
  .popup__head,
  .popup__content,
  .popup-source,
  .popup-source_big,
  .popup_volunteer,
  .popup__content_addcandidate {
    width: 100% !important;
    max-width: 100% !important;
  }

  .popup__head,
  .popup__content,
  .popup-source .popup__content,
  .popup_sumup .popup__content {
    height: auto;
    margin-left: 0;
    padding: 28px 18px;
  }

  .popup_sumup .popup__head {
    padding: 48px 18px;
  }

  .popup-source_big .img {
    float: none;
    max-width: 100%;
    margin: 0 auto 18px;
  }

  .popup_welcome .column,
  .welcome .column {
    float: none;
    width: 100%;
  }

  .popup_welcome .sep-line .welcome__list {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #b7b7b7;
    border-left: 0;
  }

  .popup_welcome .sep-line .welcome__list:after {
    top: -12px;
    left: 50%;
    margin-left: -15px;
  }

  .source-popup {
    max-width: 100%;
  }
}

@media (max-width: 767px) {
  .constrain,
  .page_volunteer .constrain {
    margin-right: 16px;
    margin-left: 16px;
  }

  .header__top {
    margin-right: 16px;
    margin-left: 16px;
  }

  .header__top > a:first-of-type {
    width: min(235px, calc(100vw - 96px));
  }

  .header__btns {
    align-items: stretch;
  }

  .header__btns > div:last-child {
    flex: 1 1 100%;
  }

  .header__btns > div:last-child .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
  }

  .tile-widgets .row,
  .speech-inline,
  .filter-persons .row {
    grid-template-columns: 1fr;
  }

  .tw-block,
  .tw-block_sm,
  .tw-block_person-sm {
    height: auto;
    min-height: 260px;
  }

  .tw-block_sm,
  .tw-block_person-sm {
    min-height: 150px;
  }

  .tw-block_news-line {
    min-height: 520px;
  }

  .tw-block_lg .tw-block-title,
  .tw-block-title_name {
    font-size: 22px;
  }

  .speech-inline__item .img {
    max-width: 280px;
    margin-right: auto;
    margin-left: auto;
  }

  .profile-main .item {
    flex-basis: calc(50% - 8px);
    min-width: 0;
  }

  .timeline__container {
    padding-left: 28px;
  }

  .timeline__event {
    padding-left: 12px;
  }

  .candidate__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .candidate__name,
  .candidate__post {
    overflow-wrap: anywhere;
  }

  .news-title {
    padding-right: 0;
  }

  .news-title .important {
    position: static;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin-top: 14px;
  }

  .user-card .info-head {
    min-height: 0;
  }

  .confirm-head .img {
    float: none;
    display: block;
    margin: 0 auto 20px;
  }

  .footer .constrain {
    margin-right: 20px;
    margin-left: 20px;
  }
}

@media (max-width: 479px) {
  .constrain,
  .page_volunteer .constrain {
    margin-right: 12px;
    margin-left: 12px;
  }

  .header__top {
    gap: 12px;
    margin-right: 12px;
    margin-left: 12px;
  }

  .header__btns .signin {
    margin-right: 10px;
  }

  .tile-widgets-title {
    padding-bottom: 24px;
  }

  .profile-main .item {
    flex-basis: 100%;
    max-width: 100%;
  }

  .candidate__list {
    grid-template-columns: 1fr;
  }

  .candidate__item {
    max-width: 220px;
    margin-right: auto;
    margin-left: auto;
  }

  .bvote__action {
    align-items: stretch;
  }

  .bvote__action .bvote-btn {
    flex: 1 1 0;
  }

  .popup__head,
  .popup__content,
  .popup-source .popup__content {
    padding-right: 14px;
    padding-left: 14px;
  }
}

@media (max-width: 1023px) and (orientation: landscape) {
  .header__nav {
    max-height: calc(100vh - 24px);
  }

  .fancybox-inner {
    max-height: calc(100vh - 24px) !important;
  }
}

@media (max-width: 1023px) and (pointer: coarse) {
  a,
  button,
  input[type="button"],
  input[type="submit"],
  input[type="checkbox"] + label,
  input[type="radio"] + label,
  .link,
  .btn,
  .easy-button {
    touch-action: manipulation;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-nav-toggle__icon,
  .mobile-nav-toggle__icon:before,
  .mobile-nav-toggle__icon:after {
    transition: none;
  }
}
