.BbCode{
    color: var(--site-color);
    --matgin-gap: 30px;
}
.BbCode p{
    margin: var(--matgin-gap) 0;
}
.BbCode .bb-html{
    max-width: 100%;
    margin: var(--matgin-gap) 0;
    display: grid;
    grid-template-columns: 100%;
}
.BbCode .bb-html > iframe{
    max-width: 100%;
}
.BbCode .bb-video{
    position: relative;
    padding-top: calc(100% / 16 * 9);
    overflow: hidden;
}
.BbCode .bb-video-content{
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 100%;
}
.BbCode .bb-video-content iframe{
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
    overflow: hidden;
}
.BbCode .bb-spoiler{
    display: grid;
    margin: var(--matgin-gap) -10px;
}
.BbCode .bb-spoiler-title{
    border-left: 10px solid var(--site-color-corporate);
    padding-left: 20px;
    background-color: var(--site-color-gray);
    background-image: url("./spoiler-open.svg");
    background-size: 12px auto;
    background-position: calc(100% - 10px) 50%;
    background-repeat: no-repeat;
    cursor: pointer;
    line-height: 40px;
    font-style: italic;
    font-weight: bold;
    font-size: 14px;
    color: var(--site-color);
    user-select: none;
}
.BbCode .bb-spoiler-title:hover,
.BbCode .bb-spoiler-title:focus{
    background-color: var(--site-color-hidden);
}
.BbCode .bb-spoiler.open > .bb-spoiler-title{
    background-image: url("./spoiler-close.svg");
}
.BbCode .bb-spoiler-close{
    padding-left: 30px;
    background-color: var(--site-color-gray);
    background-image: url("./spoiler-close.svg");
    background-size: 12px auto;
    background-position: calc(100% - 10px) 50%;
    background-repeat: no-repeat;
    cursor: pointer;
    line-height: 40px;
    font-style: italic;
    font-weight: bold;
    font-size: 14px;
    color: var(--site-color);
    user-select: none;
}
.BbCode .bb-spoiler-close:hover,
.BbCode .bb-spoiler-close:focus{
    background-color: var(--site-color-hidden);
}

.BbCode .bb-spoiler > .bb-spoiler-close,
.BbCode .bb-spoiler > .bb-spoiler-content{
    display: none;
}
.BbCode .bb-spoiler.open > .bb-spoiler-close,
.BbCode .bb-spoiler.open > .bb-spoiler-content{
    display: block;
}
.BbCode .bb-spoiler-content{
    padding: 0 10px;
}
.BbCode .bb-vrez{
    margin: 1em 0;
    padding: 0 0 0 20px;
    border-left: 2px solid var(--site-color-corporate);
}
@media (min-width: 760px){
    .BbCode .bb-vrez{
        margin: 1em 0;
    }
}
@media (min-width: 780px){
    .BbCode .bb-vrez{
        margin: 1em 0;
    }
}
.BbCode h2{
    font-family: var(--site-font-family-name);
    font-weight: bold;
    font-size: 24px;
    line-height: 30px;
    color: #1A1A1A;
    margin: calc(var(--matgin-gap) * 2) 0 var(--matgin-gap) 0;
    padding-left: 20px;
    position: relative;
}
.BbCode h2:before{
    content: '';
    position: absolute;
    top: 1px;
    left: 0;
    height: 20px;
    width: 10px;
    background-color: var(--site-color-corporate);
}
.BbCode b{
    font-weight: bold;
}
.BbCode i{
    font-style: italic;
}
.BbCode u{
    text-decoration: underline;
}
.BbCode s{
    text-decoration: line-through;
}
.BbCode .bb-quote{
    padding: 0 0 0 44px;
    margin: 1em 0;
    display: block;
    background-size: auto 22px;
    background-repeat: no-repeat;
    background-image: url("./blockquote.svg");
    font-weight: 300;
    font-size: 18px;
    line-height: 22px;
}
.BbCode .bb-quote-no-icon{
    font-weight: 300;
    font-size: 18px;
    line-height: 22px;
}
.BbCode .bb-big-p{
    font-weight: 300;
    font-size: 24px;
    line-height: 32px;
}
.BbCode .bb-important{
    border: 5px solid var(--site-color-gray);
}
.BbCode .bb-important-title{
    background-color: var(--site-color-gray);
    font-weight: bold;
    font-size: 18px;
    line-height: 40px;
    padding-bottom: 5px;
    padding-left: 57px;
    background-image: url("./important.svg");
    background-position: 15px 50%;
    background-size: 22px;
    background-repeat: no-repeat;
}
.BbCode .bb-important > p{
    padding: 0 11px 0 39px;
    position: relative;
}
.BbCode .bb-important > p:before{
    position: absolute;
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    top: calc((1em * var(--site-line-height) - 10px) / 2);
    left: calc((39px - 10px) / 2);
    background-color: var(--site-color-corporate);
}
.BbCode .bb-list{
    list-style-type: none;
    padding: 0;
    margin: var(--matgin-gap) 0;
}

.BbCode .bb-list li{
    margin: calc(var(--matgin-gap) / 2) 0 calc(var(--matgin-gap) / 2) 23px;
}
.BbCode .bb-list li:before{
    width: 23px;
    margin-left: -23px;
    text-align: center;
    display: inline-block;
    font-weight: bold;
    overflow: hidden;
    vertical-align: middle;
}
.BbCode .bb-list-s li:before{
    color: var(--site-color-corporate);
    content: "\2022";
    font-size: 39px;
    line-height: calc(var(--site-line-height) * var(--site-font-size));
}
.BbCode .bb-list-1 li{
    counter-increment: li;
}
.BbCode .bb-list-1 li:before{
    content:counter(li) '.';
    list-style-type: decimal;
}
@media (min-width: 740px){
    .BbCode .bb-list li{
        margin: calc(var(--matgin-gap) / 2) 0 calc(var(--matgin-gap) / 2) 47px;
    }
    .BbCode .bb-list li:before{
        width: 47px;
        margin-left: -47px;
    }
}
.bb-cards{
    display: grid;
    gap: 20px;
    grid-template-columns: minmax(285px,100%);
}
.BbCode .bb-card{
    counter-increment: div;
    border: 5px solid var(--site-color-gray);
    padding: 33px 20px;
}
.BbCode .bb-card:before{
    content: counter(div);
    display: block;
    float: right;
    font-weight: bold;
    font-size: 36px;
    line-height: 26px;
    color: var(--site-color-corporate);
    padding: 0 0 var(--site-font-size) var(--site-font-size);
}
.BbCode .bb-card > *:first-child > *:first-child > *:first-child > *:first-child,
.BbCode .bb-card > *:first-child > *:first-child > *:first-child,
.BbCode .bb-card > *:first-child > *:first-child,
.BbCode .bb-card > *:first-child{
    margin-top: 0;
}
.BbCode .bb-card > h2:first-child{
    border: none;
    padding: 0;

}
.BbCode .bb-card > h2:first-child:before{
    display: none;
}
.BbCode .bb-card > *:last-child > *:last-child > *:last-child > *:last-child,
.BbCode .bb-card > *:last-child > *:last-child > *:last-child,
.BbCode .bb-card > *:last-child > *:last-child,
.BbCode .bb-card > *:last-child{
    margin-bottom: 0;
}
@media (min-width: 780px){
    .BbCode .bb-card{
        margin: 0 -30px;
        padding: 55px 25px 55px 75px;
        position: relative;
    }
    .BbCode .bb-card:before{
        float: none;
        padding: 0;
        position: absolute;
        top: 55px;
        left: 25px;
        font-size: 32px;
    }
}

.BbCode .bb-articles{
    display: grid;
    gap: 20px;
    padding: 30px 10px 30px 20px;
    background-color: var(--site-color-gray);
}
.BbCode .bb-articles-title{
    font-weight: bold;
    font-size: 18px;
    line-height: 21px;
}
.BbCode .bb-articles-list{
    display: grid;
    gap: 20px;
}
.BbCode .bb-articles-article{
    display: grid;
    gap: 10px;
    grid-template-columns: auto 1fr;
    align-items: start;
}
.BbCode .bb-articles-article-image{
    position: relative;
    width: 75px;
    border-right: 3px solid var(--site-color-corporate);
    padding-top: calc(100% / 75 * 40);
    z-index: 0;
}
.BbCode .bb-articles-article-image:before{
    position: absolute;
    content: '';
    z-index: 1;
    opacity: 0;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-color: var(--site-background-color-content);
    transition: opacity 50ms linear;
}
.BbCode .bb-articles-article-image:hover:before,
.BbCode .bb-articles-article-image:focus:before{
    opacity: 0.2;
}
.BbCode .bb-articles-article-image-img{
    z-index: 0;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
}
.BbCode .bb-articles-article-name{
    align-self: start;
    text-decoration: none;
    color: var(--site-color);
    font-size: 15px;
    line-height: 16px;
    transition: color 50ms linear;
}
.BbCode .bb-articles-article-name:hover,
.BbCode .bb-articles-article-name:focus{
    color: var(--site-color-corporate);
}

@media (min-width: 480px){
    .BbCode .bb-articles-article{
        gap: 20px;
    }
}

@media (min-width: 740px){
    .BbCode .bb-articles{
        padding-left: 45px;
        padding-right: 100px;
    }
}

.BbCode .bb-file{
    width: 300px;
    height: 50px;
    background-image: url("./file-download.svg"), var(--bg);
    background-position: calc(100% - 20px) 50%, 20px 50%;
    background-size: 18px auto, 30px auto;
    background-repeat: no-repeat;
    background-color: var(--site-color-gray);
    padding-right: 50px;
    padding-left: 70px;
    box-sizing: border-box;
    overflow: hidden;
    margin: 1em 0;
    display: grid;
    text-decoration: none;
    transition: box-shadow 50ms linear;
}
.BbCode .bb-file + .bb-file{
    margin-top: 10px;
}
.BbCode .bb-file:focus,
.BbCode .bb-file:hover{
    box-shadow: 0 0 8px 0px var(--site-color-hidden);
}
.BbCode .bb-file-name{
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    align-self: center;
    font-style: italic;
    font-weight: 500;
    font-size: 14px;
    line-height: 16px;
    color: var(--site-color);
}
.BbCode .bb-files{
    display: grid;
    gap: 20px;
}
.BbCode .bb-files-title{
    font-weight: bold;
    font-size: 18px;
    line-height: 26px;
}
.BbCode .bb-files-list{
    display: grid;
    gap: 10px;
    justify-items: start;
}
.BbCode .bb-html > .bb-file{
    margin: 10px 0;
}
.BbCode .bb-files-list .bb-file{
    margin: 0;
}

.BbCode .bb-link{
    color: var(--site-color);
    text-decoration: underline;
    text-decoration-color: var(--site-color-corporate);
}
.BbCode .bb-link:hover,
.BbCode .bb-link:focus{
    color: var(--site-color-corporate);
}

.BbCode .bb-quiz{
    display: grid;
    gap: 15px;
}
.BbCode .bb-quiz .quiz-name{
    font-weight: bold;
    font-size: 18px;
    line-height: 21px;
}
.BbCode .bb-quiz .quiz-variants{
    padding-left: 10px;
    border-left: 3px solid var(--site-color-corporate);
    display: grid;
    gap: 15px;
}

.BbCode .bb-quiz .quiz-variant-close{
    display: grid;
    gap: 10px;
    padding-bottom: 26px;
    position: relative;
}
.BbCode .bb-quiz .quiz-variant-close .quiz-variant-variant_name{
    font-size: 16px;
    line-height: 18px;
}
.BbCode .bb-quiz .quiz-variant-close .quiz-variant-count{
    position: absolute;
    bottom: 0;
    margin-top: 26px;
    font-style: italic;
    font-weight: bold;
    font-size: 13px;
    line-height: 26px;
}
.BbCode .bb-quiz .quiz-variant-close .quiz-100_percent{
    height: 6px;
    background-color: var(--site-color-gray);
    display: grid;
    justify-items: start;
    grid-template-rows: 100%;
}
.BbCode .bb-quiz .quiz-variant-close .quiz-percent{
    background-color: var(--site-color-corporate);
}

.BbCode .bb-quiz .quiz-variant-open{
    cursor: pointer;
}
.BbCode .bb-quiz .quiz-variant-open input{
    display: none;
}
.BbCode .bb-quiz .quiz-variant-open .quiz-variant_name{
    padding-left: 24px;
    position: relative;
    z-index: 0;
}
.BbCode .bb-quiz .quiz-variant-open input[type="radio"] + .quiz-variant_name:before{
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    box-sizing: border-box;
    border: 2px solid var(--site-color);
    z-index: 1;
    border-radius: 50%;
}
.BbCode .bb-quiz .quiz-variant-open input[type="radio"] + .quiz-variant_name:after{
    content: '';
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    box-sizing: border-box;
    background-color: var(--site-color-corporate);
    z-index: 1;
    opacity: 0;
    border-radius: 50%;
}
.BbCode .bb-quiz  .quiz-variant-open input[type="checkbox"] + .quiz-variant_name:before{
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    box-sizing: border-box;
    border: 2px solid var(--site-color);
    z-index: 1;
    border-radius: 20%;
}
.BbCode .bb-quiz .quiz-variant-open input[type="checkbox"] + .quiz-variant_name:after{
    content: '';
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    box-sizing: border-box;
    background-color: var(--site-color-corporate);
    z-index: 1;
    opacity: 0;
    border-radius: 50%;
}
.BbCode .bb-quiz .quiz-variant-open .quiz-variant_name:hover:before{
    border-color: var(--site-color-corporate);
}
.BbCode .bb-quiz .quiz-variant-open input:checked + .quiz-variant_name:after{
    opacity: 1;
}
.BbCode .bb-quiz .quiz-variant-open input:checked + .quiz-variant_name:before{
    border-color: var(--site-color-corporate);
}

.BbCode .bb-quiz .quiz-send > input{
    background-color: var(--site-color-corporate);
    line-height: 36px;
    font-style: italic;
    font-weight: bold;
    font-size: 13px;
    color: var(--site-background-color-content);
    padding: 0 46px;
    border: none;
    outline: none;
    cursor: pointer;
    text-transform: uppercase;
}
.BbCode .bb-quiz .quiz-send > input:hover,
.BbCode .bb-quiz .quiz-send > input:focus{
    box-shadow: 0 0 8px 0 var(--site-color-hidden);
}

@media (min-width: 760px){
    .BbCode .bb-quiz{
        gap: 36px;
    }
    .BbCode .bb-quiz .quiz-variants{
        margin-left: -18px;
    }
}
@media (min-width: 780px){
    .BbCode .bb-quiz .quiz-variants{
        margin-left: -27px;
        padding-left: 20px;
    }
}

.BbCode > *:first-child > *:first-child > *:first-child,
.BbCode > *:first-child > *:first-child,
.BbCode > *:first-child{
    margin-top: 0;
}

.BbCode .bb-html > table{
    border: none;
    border-collapse: collapse;
    width: 100%;
}
.BbCode .bb-html > table tr > td,
.BbCode .bb-html > table tr > th{
    padding: 10px 11px;
}
.BbCode .bb-html > table tr > th{
    font-weight: 500;
    color: var(--site-color-corporate);
    text-align: start;
    background-color: var(--site-color-gray);
    border-right: 2px solid var(--site-color-gray);
}
.BbCode .bb-html > table tr:nth-child(2n + 1) > td{
    background-color: var(--site-color-gray);
}

.BbCode .bb-html > table tr > td{
    border-right: 2px solid var(--site-color-gray);
}
.BbCode .bb-html > table tr > td:last-child,
.BbCode .bb-html > table tr > th:last-child{
    border-right: none;
}
.BbCode > *:empty{
    display: none;
}