body.ym-brand-legacy {
    --ym-legacy-blue: #0869c3;
    --ym-legacy-blue-dark: #0657a2;
    --ym-legacy-sky: #edf7ff;
    --ym-legacy-ink: #133455;
    --ym-legacy-line: #dbe8f4;
    --ym-legacy-footer: #102d4b;
    --ym-legacy-footer-text: #e5f0fb;
    --ym-legacy-width: min(1200px, calc(100% - 40px));
}

/* Keep each legacy header and its original navigation controls. */
.ym-brand-legacy #common-navigation-bar.navigation-type-1,
.ym-brand-legacy #common-navigation-bar .nav-bar-container {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
}
.ym-brand-legacy #common-navigation-bar .nav-bar-container,
.ym-brand-legacy .common-nav-container,
.ym-brand-legacy .common-nav-container .common-nav,
.ym-brand-legacy .ub-header-b,
.ym-brand-legacy .tabbar-container .tabbar {
    background-color: #fff !important;
    border-color: var(--ym-legacy-line);
}

.ym-brand-legacy #common-navigation-bar .nav-bar,
.ym-brand-legacy .common-nav-container .nav-top,
.ym-brand-legacy .ub-header-b > .ub-container {
    box-sizing: border-box;
    width: var(--ym-legacy-width) !important;
    min-width: 0 !important;
    max-width: 1200px !important;
    margin-inline: auto !important;
}

.ym-brand-legacy .common-nav-container,
.ym-brand-legacy .ub-header-b {
    box-shadow: 0 1px 0 var(--ym-legacy-line);
}

.ym-brand-legacy #common-navigation-bar .nav-bar-list > .item > .item-a,
.ym-brand-legacy .common-nav-container .city-name,
.ym-brand-legacy .ub-header-b .nav a {
    color: var(--ym-legacy-ink);
}

.ym-brand-legacy #common-navigation-bar .nav-bar-list > .item > .item-a:hover,
.ym-brand-legacy #common-navigation-bar .nav-bar-list > .item.active > .item-a,
.ym-brand-legacy #common-navigation-bar .nav-bar-list > .item > .item-a.is-current,
.ym-brand-legacy .common-nav-container .nav-highlight,
.ym-brand-legacy .case-tab .aBox.active a,
.ym-brand-legacy .tabbar .active,
.ym-brand-legacy .ub-header-b .nav a:hover,
.ym-brand-legacy .ub-breadcrumb a:hover,
.ym-brand-legacy .articles-list:hover .article-list-title {
    color: var(--ym-legacy-blue) !important;
}

.ym-brand-legacy #common-navigation-bar .ym-header-actions .ym-header-demo,
.ym-brand-legacy .advisory .qq-advisory-btn,
.ym-brand-legacy .advisory .advisory-tbn,
.ym-brand-legacy .ub-search-block .form button[type="submit"] {
    color: #fff !important;
    background: var(--ym-legacy-blue) !important;
    border-color: var(--ym-legacy-blue) !important;
}

.ym-brand-legacy #common-navigation-bar .ym-header-actions .ym-header-demo:hover,
.ym-brand-legacy .advisory .qq-advisory-btn:hover,
.ym-brand-legacy .advisory .advisory-tbn:hover,
.ym-brand-legacy .ub-search-block .form button[type="submit"]:hover {
    background: var(--ym-legacy-blue-dark) !important;
    border-color: var(--ym-legacy-blue-dark) !important;
}

.ym-brand-legacy :is(#common-navigation-bar, .common-nav-container, .tabbar-container, .ub-header-b, .ub-search-block) :is(a, button, input):focus-visible {
    outline: 2px solid var(--ym-legacy-blue);
    outline-offset: 2px;
}

/* Keep the existing artwork and the contents of listings, filters and forms. */
.ym-brand-legacy .w-1200,
.ym-brand-legacy .advisory-container,
.ym-brand-legacy .footer-container {
    min-width: 0;
}

.ym-brand-legacy section.case {
    background: linear-gradient(110deg, #eaf6ff, #d8ebfc);
    border-bottom: 1px solid var(--ym-legacy-line);
}

.ym-brand-legacy section.case .page-title-white {
    color: var(--ym-legacy-ink) !important;
}

.ym-brand-legacy section.case > .container,
.ym-brand-legacy .gallery-type-1,
.ym-brand-legacy .container-xxl > .row.no-mx,
.ym-brand-legacy .advisory-container > .advisory,
.ym-brand-legacy .footer-container .common-box,
.ym-brand-legacy > .ub-container,
.ym-brand-legacy .ub-footer-link > .ub-container {
    box-sizing: border-box;
    width: var(--ym-legacy-width) !important;
    max-width: 1200px !important;
    margin-inline: auto !important;
}

.ym-brand-legacy .gallery-type-1 > .container-lg {
    max-width: 100%;
}

.ym-brand-legacy .advisory-container {
    background-color: var(--ym-legacy-sky);
}

.ym-brand-legacy .main > .case-tab {
    background-color: var(--ym-legacy-sky);
    border-bottom: 1px solid var(--ym-legacy-line);
}

.ym-brand-legacy .main :is(.case-con, .new-con) {
    max-width: 1200px;
    margin-inline: auto;
}

.ym-brand-legacy .ub-content .panel-a,
.ym-brand-legacy .ub-search-block,
.ym-brand-legacy > .ub-cover.tw-bg-gradient-to-br {
    color: var(--ym-legacy-ink) !important;
    background-color: var(--ym-legacy-sky) !important;
    background-image: linear-gradient(125deg, #f8fbff, #dcefff) !important;
    border-bottom: 1px solid var(--ym-legacy-line);
}

.ym-brand-legacy .ub-content .panel-a > .box,
.ym-brand-legacy .ub-search-block > .title {
    max-width: var(--ym-legacy-width);
    margin-inline: auto;
    color: var(--ym-legacy-ink);
}

.ym-brand-legacy .ub-content .panel-a :is(.title, .sub-title) {
    color: var(--ym-legacy-ink);
}

.ym-brand-legacy .ub-search-block > .form {
    max-width: min(680px, calc(100% - 32px));
    margin-inline: auto;
}

.ym-brand-legacy :is(.footer-container, .footer-container > .footer, .footer-container .footer-bar-list-container, .footer-container .footer-box-container, .footer-container .footer-copyright-container, .ub-footer-link.reverse),
.ym-brand-legacy[tabName] > .footer {
    color: var(--ym-legacy-footer-text);
    background-color: var(--ym-legacy-footer);
}

.ym-brand-legacy .ub-footer-link.reverse > .tw-text-center {
    background-color: #0b233c !important;
}

.ym-brand-legacy :is(.footer-container, .ub-footer-link.reverse) a,
.ym-brand-legacy[tabName] > .footer a {
    color: var(--ym-legacy-footer-text);
}

.ym-brand-legacy :is(.footer-container, .ub-footer-link.reverse) a:hover,
.ym-brand-legacy[tabName] > .footer a:hover {
    color: #a9d7ff;
}

@media (max-width: 768px) {
    body.ym-brand-legacy {
        --ym-legacy-width: calc(100% - 32px);
    }

    .ym-brand-legacy #common-navigation-bar .nav-bar,
    .ym-brand-legacy #common-navigation-bar .top-row {
        width: 100% !important;
    }

    .ym-brand-legacy .common-nav-container .nav-top {
        width: 100% !important;
    }
}
