:root body {
    --freewel-page-gutter: 22px;
}

:root body .sub-visual.sub-visual :is(.breadcrumb-container, .page-title),
:root body .sub-nav-container.orgsite-subnav .sub-nav {
    box-sizing: border-box;
    width: min(1060px, calc(100% - 2 * var(--freewel-page-gutter))) !important;
    max-width: 1060px !important;
    margin-inline: auto !important;
    padding-inline: 0 !important;
}

:root body .sub-visual .breadcrumb-wrap {
    inset-block-start: 0;
    inset-inline-start: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    padding-inline: 0;
}

:root body .sub-visual {
    height: 225px;
}

:root body .sub-visual-img {
    position: relative;
    height: 100%;
}

:root body .sub-visual-img::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgb(20 28 25 / 45%), rgb(20 28 25 / 72%) 35% 65%, rgb(20 28 25 / 45%));
    pointer-events: none;
}

:root body .sub-visual.sub-visual .page-title {
    position: static;
    transform: none !important;
    opacity: 1;
    animation: none;
    color: #fff;
    font-size: clamp(30px, 3.5vw, 48px);
    font-weight: 750;
    line-height: 1.25;
    text-align: center;
    word-break: keep-all;
    overflow-wrap: anywhere;
    -webkit-text-stroke: 2px #17211e;
    paint-order: stroke fill;
    text-shadow: 0 2px 5px rgb(0 0 0 / 50%);
}

:root body .sub-visual nav.breadcrumb[aria-label="현재 위치"] {
    justify-content: center;
    max-width: none;
    margin: 0;
    padding: 0;
    background: transparent;
    color: #f2eee9;
    opacity: 1;
    transform: none;
    animation: none;
}

:root body .sub-visual .breadcrumb a[aria-label="홈"] .home-icon {
    display: none;
}

:root body .sub-visual .breadcrumb a[aria-current="page"] {
    color: #fff;
    font-weight: 700;
}

:root body :is(.content-page-wrap, .history-wrapper, .managed-history-shell, .org-diagram-page) {
    box-sizing: border-box;
    width: min(1000px, calc(100% - 2 * var(--freewel-page-gutter))) !important;
    max-width: 1000px !important;
    margin-inline: auto !important;
    padding-inline: 0 !important;
}

:root body .sub-nav-container.orgsite-subnav {
    margin-bottom: 16px !important;
}

:root body .sub-visual + .sub-nav-container.orgsite-subnav {
    margin-top: -12px !important;
}

:root body .freewel-intro-subnav + .content-page-wrap {
    padding-top: clamp(24px, 4vw, 48px) !important;
}

@media (min-width: 1101px) {
    :root body .header .main-menu > li[data-has-submenu] > a::after {
        content: "";
        width: .42em;
        height: .42em;
        margin-inline-start: .6em;
        border-inline-end: 2px solid currentColor;
        border-block-end: 2px solid currentColor;
        transform: translateY(-2px) rotate(45deg);
    }

    :root body .header.header .all-submenu {
        background: #fff;
        border: 1px solid #e9e4dd;
        border-top: 0;
        border-radius: 0 0 12px 12px;
        box-shadow: 0 12px 24px rgb(48 33 20 / 12%);
        padding: 0;
    }

    :root body .header.header .all-submenu-container {
        grid-template-columns: 1fr;
        padding: 14px 18px;
    }

    :root body .header.header .submenu-group:not(:has(> ul > li)) {
        display: none;
    }

    :root body .header.header .submenu-group {
        border: 0;
        padding: 0;
    }

    .freewel-menu-parent {
        margin: 0 0 8px;
        padding: 2px 12px 10px;
        border-bottom: 1px solid #ece3da;
        color: #583923;
        font-size: 15px;
        font-weight: 700;
        text-align: left;
    }

    :root body .header.header .submenu-group > ul {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 8px;
        margin: 0;
        padding: 0;
    }

    :root body .header.header .submenu-group > ul > li {
        margin: 0;
    }

    :root body .header.header .submenu-group a {
        box-sizing: border-box;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        min-height: 48px;
        padding: 8px 12px;
        border-radius: 6px;
        color: #2e2722;
        font-size: 15px;
        font-weight: 600;
        text-decoration: none;
    }

    :root body .header.header .submenu-group a:is(:hover, :focus-visible) {
        background: #fff0e3;
        color: #632d0b;
    }

    :root body .header.header .submenu-group a[aria-current="page"] {
        background: #ffe4cf;
        color: #632d0b;
        font-weight: 700;
    }

    :root body .header.header .submenu-group a:focus-visible {
        outline: 2px solid #a84b16;
        outline-offset: -2px;
    }
}

@media (max-width: 768px) {
    :root body {
        --freewel-page-gutter: 16px;
    }

    :root body .sub-visual {
        height: 150px;
    }

    :root body .sub-visual-img::after {
        background: rgb(20 28 25 / 67%);
    }

    :root body #menuOverlay .overlay-menu > ul > li > ul {
        margin-inline-start: 8px;
        border-inline-start: 2px solid #efc09f;
    }

    :root body .sub-nav-container.orgsite-subnav {
        margin-bottom: 12px !important;
    }

    :root body .sub-nav-container.orgsite-subnav .sub-nav > ul {
        display: flex !important;
        flex-wrap: wrap;
    }

    :root body .sub-nav-container.orgsite-subnav .sub-nav > ul > li {
        flex: 1 0 30% !important;
    }
}
