.dod-portal-shell {
    --portal-paper: #f4f6f2;
    --portal-ink: #142b24;
    --portal-muted: #4f655b;
    --portal-line: #d9e3dc;
    --portal-green: #166047;
    --portal-deep: #11392d;
    --portal-width: 1264px;
    color: var(--portal-ink);
    background: var(--portal-paper);
}

.dod-portal-shell :is(header, #__main_menu, #main-content, .links-block, footer) .max-w-6xl {
    width: 100%;
    max-width: var(--portal-width);
    margin-inline: auto;
    padding-inline: 24px;
}

.dod-portal-shell :is(a, button, input, [tabindex]):focus-visible {
    outline: 3px solid #13815b;
    outline-offset: 3px;
}

.dod-portal-shell header {
    border-top: 4px solid var(--portal-green);
    padding-block: 12px;
}

.dod-portal-shell header .top-logo {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    text-align: left;
}

.dod-portal-shell header .top-logo .image {
    width: 52px;
    max-width: none;
    margin: 0;
}

.dod-portal-shell header .top-logo .text {
    color: var(--portal-ink);
}

.dod-portal-shell header .top-logo .text .font-bold {
    font-weight: 500;
}

.dod-portal-shell header .top-logo .text p + p {
    color: var(--portal-muted);
    font-size: 14px !important;
    line-height: 1.35;
}

.dod-portal-shell header :is(.portal-header-catalog, a.button-blue) {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 8px 13px;
    color: var(--portal-green);
    background: #edf5ef;
    border: 1px solid var(--portal-line);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
}

.dod-portal-shell header :is(.portal-header-catalog, a.button-blue):hover {
    color: white;
    background: var(--portal-green);
}

.dod-portal-shell header :is(.login-button, .bvi-open) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    margin: 0 !important;
    color: var(--portal-green);
    background: #edf5ef !important;
    border: 1px solid var(--portal-line);
    border-radius: 10px;
}

.dod-portal-shell header :is(.login-button, .bvi-open):hover {
    color: #fff;
    background: var(--portal-green) !important;
}

.dod-portal-shell header :is(.login-button, .bvi-open) svg {
    width: 19px;
    height: 19px;
}

.dod-portal-shell header .bvi-open {
    margin-inline: 8px !important;
}

.dod-portal-shell #__main_menu {
    padding: 0;
    color: var(--portal-ink);
    background: white;
    border-block: 1px solid var(--portal-line);
}

.dod-portal-shell #__main_menu .px-5 {
    padding-inline: 0;
}

.dod-portal-shell #__main_menu .main-menu-styled {
    width: 100%;
    min-height: 0;
}

.dod-portal-shell #__main_menu :is(.menubarlink, .menucloselink) {
    display: none !important;
}

.dod-portal-shell #mainmenu {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0 22px;
    padding: 0;
    margin: 0;
}

.dod-portal-shell #mainmenu > li {
    display: flex;
    padding: 0;
    border: 0;
    margin: 0;
}

.dod-portal-shell #mainmenu > li > a {
    display: flex;
    align-items: center;
    min-height: 49px;
    padding: 8px 0;
    border: 0;
    color: var(--portal-ink) !important;
    background: transparent;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.25;
    text-decoration: none;
    letter-spacing: .015em;
}

.dod-portal-shell #mainmenu > li > a:hover {
    color: var(--portal-green) !important;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.dod-portal-shell #mainmenu > li > a > span {
    color: inherit !important;
}

.dod-portal-shell #main-content,
.dod-portal-home :is(.modules-top-block, .modules-bottom-block) {
    background: var(--portal-paper);
}

.dod-portal-home .portal-intro {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    min-height: 352px;
    overflow: hidden;
    margin: 32px auto 42px;
    width: calc(100% - 48px);
    max-width: calc(var(--portal-width) - 48px);
    border-radius: 22px;
    color: #fff;
    background: var(--portal-deep);
}

.dod-portal-home .portal-intro__copy {
    z-index: 1;
    container-type: inline-size;
    width: 64%;
    padding: 38px clamp(28px, 4.5vw, 68px);
}

.dod-portal-home #portal-title {
    max-width: 630px;
    margin: 0;
    color: #fff;
    font-size: clamp(16px, 3.15vw, 42px);
    font-size: clamp(16px, 6.6cqi, 42px);
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -.035em;
}

.dod-portal-home #portal-title > span {
    display: block;
}

.dod-portal-home .portal-intro__photo {
    z-index: -2;
    position: absolute;
    inset: 0 0 0 auto;
    width: 56%;
    height: 100%;
    object-fit: cover;
    object-position: 40% center;
}

.dod-portal-home .portal-intro::before {
    z-index: -1;
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(90deg, #11392d 0%, #11392d 48%, #11392d7d 58%, transparent 74%);
}

.dod-portal-home .portal-intro__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-block-start: 34px;
}

.dod-portal-home .portal-action {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 10px 15px;
    border: 1px solid #adc4b5;
    border-radius: 9px;
    color: #fff;
    background: transparent;
    text-decoration: none;
    text-align: left;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
}

.dod-portal-home .portal-action > svg {
    flex: none;
}

.dod-portal-home .portal-action--primary {
    border-color: #d8ecd9;
    color: #183b2b;
    background: #d8ecd9;
}

.dod-portal-home .portal-action:hover {
    border-color: white;
    color: var(--portal-deep);
    background: white;
}

.dod-portal-home .portal-action:focus-visible {
    outline-color: #fff;
}

.dod-portal-home .modules-top-block {
    margin-top: 0;
    gap: 40px;
}

.dod-portal-home .con_heading {
    display: flex;
    align-items: center;
    padding: 0 0 12px;
    margin: 0 0 16px;
    border-bottom: 1px solid var(--portal-line);
    color: var(--portal-ink);
    font-size: clamp(24px, 3vw, 35px);
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -.025em;
}

.dod-portal-home .con_heading a {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none;
}

.dod-portal-home .con_heading a::after {
    content: "→" / "";
    color: var(--portal-green);
    font-size: .7em;
}

.dod-portal-home .con_heading a:hover {
    color: var(--portal-green);
    text-decoration: underline;
    text-underline-offset: 5px;
}

.dod-portal-home :is(.mod_latest_newsnews, .videos) {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin: 0;
}

.dod-portal-home .mod_latest_newsnews > .block {
    display: flex;
    min-width: 0;
    width: auto;
    padding: 0;
    margin: 0;
}

.dod-portal-home :is(.mod_latest_newsnews .photos__item, .videos > a) {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    overflow: hidden;
    color: var(--portal-ink);
    background: #fff;
    border: 1px solid var(--portal-line);
    border-radius: 13px;
    text-decoration: none;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.dod-portal-home :is(.mod_latest_newsnews .photos__item, .videos > a):hover {
    color: var(--portal-green);
    border-color: #8ab19b;
    box-shadow: 0 8px 22px #10352a12;
}

.dod-portal-home .mod_latest_newsnews .photos__photo,
.dod-portal-home .videos > a > .image {
    flex: none;
    width: 100%;
    height: auto;
    aspect-ratio: 1.75;
    overflow: hidden;
    background: #dce8e0;
}

.dod-portal-home :is(.photos__photo, .videos .image) img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dod-portal-home .mod_latest_newsnews .photos__counter {
    display: none;
}

.dod-portal-home .photos__photo:has(img[style*="/photos/default/"]) {
    position: relative;
    background: linear-gradient(132deg, #e8f1e9, #cedfd3);
}

.dod-portal-home .photos__photo img[style*="/photos/default/"] {
    opacity: 0;
}

.dod-portal-home .photos__photo:has(img[style*="/photos/default/"])::after {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    content: "\f1ea" / "";
    color: #38765d;
    font: 900 26px "Font Awesome 5 Free";
}

.dod-portal-home .mod_latest_newsnews .photos__inner {
    width: 100%;
    padding: 13px 15px 16px;
    background: transparent;
}

.dod-portal-home :is(.mod_latest_newsnews .photos__title, .videos .font-bold) {
    color: inherit;
    font-size: 16px;
    line-height: 1.36;
    overflow-wrap: anywhere;
}

.dod-portal-home .mod_latest_newsnews .photos__item .photos__title,
.dod-portal-home .videos .font-bold {
    font-weight: 500;
}

.dod-portal-home :is(.mod_latest_newsnews, .videos) .pubdate {
    color: var(--portal-muted);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.3;
    font-variant-numeric: tabular-nums;
}

.dod-portal-home .videos .image img[style*="demo13.jpg"] {
    opacity: 0;
}

.dod-portal-home .videos .image .icon-wrapper {
    color: white;
    opacity: 1;
}

.dod-portal-home .videos .image .icomed {
    opacity: 1;
    background: #123d32e8;
    border-radius: 50%;
    padding: 13px;
    font-size: 19px;
}

.dod-portal-home .modulebody:has(> .portal-announcements) .con_heading {
    margin-bottom: 18px;
    padding-bottom: 14px;
}

.dod-portal-home .modulebody:has(> .portal-announcements) .con_heading > a {
    display: flex;
    justify-content: space-between;
    width: 100%;
    gap: 14px;
    text-decoration: none;
}

.dod-portal-home .modulebody:has(> .portal-announcements) .con_heading > a::after {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 7px 12px;
    border: 1px solid #b8cec0;
    border-radius: 8px;
    background: #edf5ef;
    color: var(--portal-green);
    content: "Все объявления →" / "";
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0;
    white-space: nowrap;
}

.dod-portal-home .modulebody:has(> .portal-announcements) .con_heading > a:hover::after {
    border-color: var(--portal-green);
    background: var(--portal-green);
    color: #fff;
}

.dod-portal-home .portal-announcements {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.dod-portal-home .portal-announcements > li {
    display: flex;
    min-width: 0;
}

.dod-portal-home .portal-announcement {
    --portal-announcement-arrow-size: 32px;
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr) var(--portal-announcement-arrow-size);
    grid-template-areas: "date title arrow";
    align-items: center;
    column-gap: 15px;
    width: 100%;
    min-height: 91px;
    padding: 13px;
    border: 1px solid var(--portal-line);
    border-radius: 12px;
    background: #fff;
    color: var(--portal-ink);
    text-decoration: none;
}

.dod-portal-home .portal-announcement:hover {
    border-color: #76a48b;
    color: var(--portal-green);
    text-decoration: none;
}

.dod-portal-home .portal-announcement__date {
    grid-area: date;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2px;
    min-height: 61px;
    padding: 6px;
    border-radius: 8px;
    background: #edf5ef;
    color: #254e3b;
    font-variant-numeric: tabular-nums;
}

.dod-portal-home .portal-announcement__day {
    font-size: 20px;
    font-weight: 500;
    line-height: 1.1;
}

.dod-portal-home .portal-announcement__year {
    color: var(--portal-muted);
    font-size: 11px;
    line-height: 1.3;
    white-space: nowrap;
}

.dod-portal-home .portal-announcement__copy {
    grid-area: title;
    min-width: 0;
    overflow-wrap: anywhere;
}

.dod-portal-home .portal-announcement__title {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.42;
}

.dod-portal-home .portal-announcement:hover .portal-announcement__title {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.dod-portal-home .portal-announcement__source {
    display: block;
    margin-top: 4px;
    color: var(--portal-muted);
    font-size: 12px;
}

.dod-portal-home .portal-announcement:has(> .portal-announcement__image) {
    grid-template-columns: 88px minmax(0, 1fr) 42px var(--portal-announcement-arrow-size);
    grid-template-areas: "date title image arrow";
}

.dod-portal-home .portal-announcement__image {
    grid-area: image;
    object-fit: cover;
    border-radius: 7px;
}

.dod-portal-home .portal-announcement__arrow {
    grid-area: arrow;
    display: grid;
    place-items: center;
    width: var(--portal-announcement-arrow-size);
    height: var(--portal-announcement-arrow-size);
    border: 1px solid #afc9b7;
    border-radius: 50%;
    background: #e7f2e9;
    color: #124a35;
}

.dod-portal-home .portal-announcement__arrow svg {
    display: block;
}

.dod-portal-home .portal-announcement:is(:hover, :focus-visible) .portal-announcement__arrow {
    border-color: var(--portal-green);
    background: var(--portal-green);
    color: #fff;
}

.dod-portal-home .portal-announcements__empty {
    grid-column: 1 / -1;
    padding: 16px;
    border: 1px solid var(--portal-line);
    border-radius: 12px;
    background: #fff;
    color: var(--portal-muted);
}

@media (max-width: 735px) {
    .dod-portal-home .portal-announcements {
        grid-template-columns: minmax(0, 1fr);
        gap: 9px;
    }
}

@media (max-width: 490px) {
    .dod-portal-home .modulebody:has(> .portal-announcements) .con_heading > a {
        gap: 6px 12px;
        flex-wrap: wrap;
    }

    .dod-portal-home .modulebody:has(> .portal-announcements) .con_heading > a::after {
        min-height: 34px;
        padding: 5px 9px;
        font-size: 12px;
    }

    .dod-portal-home .portal-announcement {
        grid-template-columns: minmax(0, 1fr) var(--portal-announcement-arrow-size);
        grid-template-areas:
            "date arrow"
            "title arrow";
        gap: 7px 10px;
        min-height: 0;
        padding: 12px;
    }

    .dod-portal-home .portal-announcement:has(> .portal-announcement__image) {
        grid-template-columns: minmax(0, 1fr) 42px var(--portal-announcement-arrow-size);
        grid-template-areas:
            "date image arrow"
            "title image arrow";
    }

    .dod-portal-home .portal-announcement__date {
        flex-direction: row;
        gap: 6px;
        justify-self: start;
        min-height: 25px;
        padding: 3px 7px;
        border-radius: 5px;
    }

    .dod-portal-home .portal-announcement__day {
        font-size: 13px;
    }

    .dod-portal-home .portal-announcement__title {
        font-size: 15px;
    }
}


.dod-portal-shell .links-block {
    padding: 28px 0 35px;
    background: #e8efea;
    border-top: 1px solid var(--portal-line) !important;
}

.dod-portal-shell .links-block h2 {
    font-size: 24px;
    font-weight: 500;
    color: var(--portal-ink);
}

.dod-portal-shell .portal-legal-footer__brand {
    font-weight: 500;
}

.dod-portal-shell .links-block .py-8 {
    padding-block: 16px 0;
}

.dod-portal-shell .partners {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.dod-portal-shell .partners .partner {
    min-width: 0;
    width: auto;
    margin: 0;
    padding: 14px;
    border: 1px solid var(--portal-line);
    border-radius: 11px;
    background: #fff;
    color: var(--portal-ink);
    overflow-wrap: anywhere;
}

.dod-portal-shell .partner h3 {
    font-size: 14px;
    line-height: 1.35;
}

.dod-portal-shell .partner p {
    margin-top: 5px;
    color: var(--portal-muted);
    font-size: 12px;
}

.dod-portal-shell .partners .partner:hover {
    border-color: #8ab19b;
    color: var(--portal-green);
}

.dod-portal-shell .footer-block {
    background: #102f27;
    color: #e0eae4;
}

.dod-portal-shell .footer-block .footer-logo img {
    width: 38px;
}

@media (max-width: 1023px) {
    .dod-portal-shell header .lg\:flex-row {
        flex-direction: row;
        gap: 10px;
    }

    .dod-portal-home .portal-intro__copy {
        width: 68%;
    }

    .dod-portal-shell .partners {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .dod-portal-shell :is(header, #__main_menu, #main-content, .links-block, footer) .max-w-6xl {
        padding-inline: 16px;
    }

    .dod-portal-shell header .top-logo {
        gap: 9px;
    }

    .dod-portal-shell header .top-logo .image {
        width: 39px;
    }

    .dod-portal-shell #mainmenu {
        gap: 0 10px;
        padding-block: 3px;
    }

    .dod-portal-shell #mainmenu > li > a {
        min-height: 35px;
        padding-block: 5px;
        font-size: 11px;
    }

    .dod-portal-home .portal-intro {
        min-height: 306px;
        width: calc(100% - 32px);
        margin-block: 18px 29px;
        border-radius: 16px;
    }

    .dod-portal-home .portal-intro__copy {
        width: 100%;
        padding: 23px 20px;
    }

    .dod-portal-home #portal-title {
        font-size: clamp(16px, 5.4vw, 28px);
        font-size: clamp(16px, 6.6cqi, 28px);
    }

    .dod-portal-home .portal-intro__actions {
        margin-block-start: 30px;
    }

    .dod-portal-home .portal-intro__photo {
        width: 100%;
        object-position: 69% center;
        transform: translateY(55px);
    }

    .dod-portal-home .portal-intro::before {
        background:
            linear-gradient(180deg, #0e3429 0, #0e3429 55px, transparent 124px),
            linear-gradient(90deg, #0e3429fa 0%, #0e3429e0 52%, #0e34296b 100%);
    }

    .dod-portal-home :is(.mod_latest_newsnews, .videos) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .dod-portal-home .mod_latest_newsnews .photos__inner,
    .dod-portal-home .videos > a > .p-4 {
        padding: 9px 10px 11px;
    }

    .dod-portal-home :is(.mod_latest_newsnews .photos__title, .videos .font-bold) {
        font-size: 14px;
    }

    .dod-portal-home :is(.mod_latest_newsnews, .videos) .pubdate {
        font-size: 10px;
    }

    .dod-portal-shell .partners {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 510px) {
    .dod-portal-shell header .lg\:flex-row {
        flex-wrap: wrap;
    }

    .dod-portal-shell header .top-logo {
        flex: 1 0 100%;
    }

    .dod-portal-shell header > div > div > div + div {
        width: 100%;
    }

    .dod-portal-shell header .justify-center.gap-4 {
        justify-content: flex-end;
    }

    .dod-portal-shell header :is(.login-button, .bvi-open) {
        width: 40px;
        height: 36px;
    }

    .dod-portal-home .portal-intro__actions {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dod-portal-home :is(.mod_latest_newsnews .photos__item, .videos > a) {
        transition: none;
    }
}

.dod-portal-shell #mainmenu > li > a {
    gap: 7px;
}

.dod-portal-shell #mainmenu > li > a::before {
    content: var(--portal-menu-icon-content, none);
    display: block;
    flex: 0 0 19px;
    width: 19px;
    height: 19px;
    background: var(--portal-menu-icon) center / contain no-repeat;
}

.dod-portal-shell #mainmenu > li > a[href="https://rmc-chr.ru/"] {
    --portal-menu-icon-content: "";
    --portal-menu-icon: url("../images/portal-menu-center.svg");
}

.dod-portal-shell #mainmenu > li > a[href="https://distdod95.ru/"] {
    --portal-menu-icon-content: "";
    --portal-menu-icon: url("../images/portal-menu-learning.svg");
}

.dod-portal-shell #mainmenu > li > a[href="https://nav.rmc-chr.ru/"] {
    --portal-menu-icon-content: "";
    --portal-menu-icon: url("../images/portal-menu-navigator.svg");
}

.dod-portal-shell #mainmenu > li > a[href^="/detskii-telefon-doverija/"] {
    --portal-menu-icon-content: "";
    --portal-menu-icon: url("../images/portal-menu-helpline.svg");
}

.dod-portal-shell #mainmenu > li > a[href="https://rctt.dod95.ru/rcod-ahmat"] {
    --portal-menu-icon-content: "";
    --portal-menu-icon: url("../images/portal-menu-olympiad.svg");
}

@media (max-width: 760px) {
    .dod-portal-shell #mainmenu > li > a {
        gap: 5px;
    }

    .dod-portal-shell #mainmenu > li > a::before {
        flex-basis: 16px;
        width: 16px;
        height: 16px;
    }
}

.dod-portal-shell:has(.portal-search[open]) {
    overflow: hidden;
}

.dod-portal-shell .portal-search {
    width: min(640px, calc(100% - 32px));
    max-width: none;
    max-height: calc(100% - 48px);
    padding: 0;
    margin: clamp(24px, 14vh, 144px) auto auto;
    border: 1px solid #c5d9cc;
    border-radius: 18px;
    background: #fff;
    color: var(--portal-ink);
    box-shadow: 0 24px 80px #071f1760;
}

.dod-portal-shell .portal-search:not([open]) {
    display: none;
}

.dod-portal-shell .portal-search::backdrop {
    background: #102f27a3;
    backdrop-filter: blur(4px);
}

.dod-portal-shell .portal-search__panel {
    padding: 24px 28px 28px;
}

.dod-portal-shell .portal-search__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 19px;
}

.dod-portal-shell #portal-search-title {
    margin: 0;
    color: var(--portal-ink);
    font-size: clamp(23px, 4vw, 29px);
    font-weight: 500;
    line-height: 1.16;
    letter-spacing: -.018em;
}

.dod-portal-shell .portal-search__close {
    display: grid;
    place-items: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--portal-line);
    border-radius: 10px;
    background: #edf5ef;
    color: var(--portal-green);
    cursor: pointer;
}

.dod-portal-shell .portal-search__close::before,
.dod-portal-shell .portal-search__close::after {
    grid-area: 1 / 1;
    width: 16px;
    height: 2px;
    border-radius: 1px;
    background: currentColor;
    content: "";
    transform: rotate(45deg);
}

.dod-portal-shell .portal-search__close::after {
    transform: rotate(-45deg);
}

.dod-portal-shell .portal-search__close:hover {
    border-color: #acc9b7;
    background: #dfede3;
}

.dod-portal-shell .portal-search__form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

.dod-portal-shell .portal-search__input {
    width: 100%;
    min-width: 0;
    min-height: 50px;
    padding: 10px 14px;
    border: 1px solid #9ab5a5;
    border-radius: 9px;
    background: #f7faf7;
    color: var(--portal-ink);
    font: inherit;
    font-size: 16px;
}

.dod-portal-shell .portal-search__input::placeholder {
    color: var(--portal-muted);
    opacity: 1;
}

.dod-portal-shell .portal-search__input:focus {
    border-color: var(--portal-green);
    outline-offset: 1px;
    background: #fff;
}

.dod-portal-shell .portal-search__submit {
    min-width: 106px;
    min-height: 50px;
    padding: 11px 18px;
    border: 1px solid var(--portal-green);
    border-radius: 9px;
    background: var(--portal-green);
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
}

.dod-portal-shell .portal-search__submit:hover {
    border-color: var(--portal-deep);
    background: var(--portal-deep);
}

@media (max-width: 480px) {
    .dod-portal-shell .portal-search {
        margin-top: 24px;
        border-radius: 14px;
    }

    .dod-portal-shell .portal-search__panel {
        padding: 16px;
    }

    .dod-portal-shell .portal-search__header {
        margin-bottom: 13px;
    }

    .dod-portal-shell .portal-search__form {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (prefers-reduced-motion: no-preference) {
    .dod-portal-shell .portal-search[open] {
        animation: portal-search-appear .16s ease-out;
    }

    @keyframes portal-search-appear {
        from {
            opacity: 0;
            transform: translateY(-6px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

.dod-portal-shell .links-block .partner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.dod-portal-shell .links-block .partner::before {
    content: var(--portal-partner-icon-content, none);
    display: block;
    flex: none;
    width: 38px;
    height: 38px;
    margin-bottom: 9px;
    border: 1px solid #dce8df;
    border-radius: 10px;
    background: #edf5ef var(--portal-partner-icon) center / 22px 22px no-repeat;
}

.dod-portal-shell .links-block .partner::after {
    content: none;
}

.dod-portal-shell .links-block .partner > p {
    margin-top: auto;
    padding-top: 6px;
}

.dod-portal-shell .links-block .partner[href="https://mon95.ru"] {
    --portal-partner-icon-content: "";
    --portal-partner-icon: url("../images/portal-partner-education.svg");
}

.dod-portal-shell .links-block .partner[href="https://edu.gov.ru"] {
    --portal-partner-icon-content: "";
    --portal-partner-icon: url("../images/portal-partner-learning.svg");
}

.dod-portal-shell .links-block .partner[href^="https://национальныепроекты.рф/"] {
    --portal-partner-icon-content: "";
    --portal-partner-icon: url("../images/portal-partner-priorities.svg");
}

.dod-portal-shell .links-block .partner[href="https://desharkho.ru/"] {
    --portal-partner-icon-content: "";
    --portal-partner-icon: url("../images/portal-partner-language.svg");
}

.dod-portal-shell .links-block .partner[href="https://chechnya.gov.ru"] {
    --portal-partner-icon-content: "";
    --portal-partner-icon: url("../images/portal-menu-center.svg");
}

@media (max-width: 480px) {
    .dod-portal-shell .links-block .partners .partner {
        padding: 12px;
    }

    .dod-portal-shell .links-block .partner::before {
        width: 34px;
        height: 34px;
        background-size: 20px 20px;
    }
}

.dod-portal-shell:has(.portal-catalog[open]) {
    overflow: hidden;
}

.dod-portal-shell .portal-catalog {
    --catalog-height: min(740px, calc(100dvh - 44px));
    width: min(1050px, calc(100% - 44px));
    height: var(--catalog-height);
    max-width: none;
    max-height: none;
    padding: 0;
    margin: auto;
    overflow: hidden;
    border: 1px solid #c5d9cc;
    border-radius: 20px;
    background: #fff;
    color: var(--portal-ink);
    box-shadow: 0 24px 80px #071f1759;
}

.dod-portal-shell .portal-catalog::backdrop {
    background: #102f27a3;
    backdrop-filter: blur(4px);
}

.dod-portal-shell .portal-catalog [hidden],
.dod-portal-shell .portal-catalog:not([open]) {
    display: none !important;
}

.dod-portal-shell .portal-catalog__panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.dod-portal-shell .portal-catalog__header {
    flex: none;
    padding: 20px 24px 13px;
    border-bottom: 1px solid var(--portal-line);
    background: #fff;
}

.dod-portal-shell .portal-catalog__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.dod-portal-shell #portal-catalog-title {
    margin: 0;
    font-size: clamp(23px, 4vw, 31px);
    font-weight: 500;
    line-height: 1.18;
    letter-spacing: -.02em;
}

.dod-portal-shell .portal-catalog__filter {
    position: relative;
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.dod-portal-shell .portal-catalog__filter .portal-search__input {
    padding-inline-start: 40px;
}

.dod-portal-shell .portal-catalog__filter input::-webkit-search-cancel-button {
    display: none;
}

.dod-portal-shell .portal-catalog__magnifier {
    position: absolute;
    top: 50%;
    left: 15px;
    width: 13px;
    height: 13px;
    border: 1.8px solid var(--portal-green);
    border-radius: 50%;
    transform: translateY(-60%);
    pointer-events: none;
}

.dod-portal-shell .portal-catalog__magnifier::after {
    position: absolute;
    top: 9px;
    left: 8px;
    width: 6px;
    height: 1.8px;
    border-radius: 2px;
    background: var(--portal-green);
    content: "";
    transform: rotate(45deg);
    transform-origin: left center;
}

.dod-portal-shell .portal-catalog__clear {
    padding-inline: 11px;
    border: 1px solid var(--portal-line);
    border-radius: 9px;
    background: #edf5ef;
    color: var(--portal-green);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.dod-portal-shell .portal-catalog__clear:hover {
    background: #dfede3;
}

.dod-portal-shell .portal-catalog__count {
    min-height: 1.35em;
    margin: 8px 0 0;
    color: var(--portal-muted);
    font-size: 13px;
    line-height: 1.35;
}

.dod-portal-shell .portal-catalog__results {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    scrollbar-color: #a2b9aa transparent;
    padding: 16px 24px 22px;
    background: #f3f6f2;
}

.dod-portal-shell .portal-catalog .sites-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 0;
}

.dod-portal-shell .portal-catalog .sites-list > div {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--portal-line);
    border-radius: 11px;
    background: #fff;
}

.dod-portal-shell .portal-catalog .sites-list h3 {
    margin: 0;
    padding: 10px 13px;
    border-bottom: 1px solid var(--portal-line);
    background: #eaf3eb;
    color: #174c38;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.38;
}

.dod-portal-shell .portal-catalog .sites-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dod-portal-shell .portal-catalog .sites-list li {
    margin: 0;
}

.dod-portal-shell .portal-catalog .sites-list li + li {
    border-top: 1px solid #e7ede8;
}

.dod-portal-shell .portal-catalog .sites-list a {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px;
    align-items: center;
    min-height: 44px;
    padding: 8px 13px;
    color: var(--portal-ink);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.32;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.dod-portal-shell .portal-catalog .sites-list a::after {
    content: "→" / "";
    color: var(--portal-green);
    font-size: 16px;
}

.dod-portal-shell .portal-catalog .sites-list a:hover {
    color: var(--portal-green);
    background: #f0f7f1;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.dod-portal-shell .portal-catalog .sites-list a:focus-visible {
    outline-offset: -3px;
}

.dod-portal-shell .portal-catalog__empty {
    margin: 0;
    padding: 18px;
    border: 1px solid var(--portal-line);
    border-radius: 11px;
    background: #fff;
    color: var(--portal-muted);
}

@media (max-width: 720px) {
    .dod-portal-shell .portal-catalog {
        --catalog-height: min(720px, calc(100dvh - 24px));
        width: calc(100% - 24px);
        border-radius: 15px;
    }

    .dod-portal-shell .portal-catalog__header {
        padding: 13px 13px 10px;
    }

    .dod-portal-shell .portal-catalog__results {
        padding: 10px 12px 15px;
    }

    .dod-portal-shell .portal-catalog .sites-list {
        grid-template-columns: minmax(0, 1fr);
        gap: 9px;
    }
}
