.ic-header {
    position: sticky;
    top: 0;
    z-index: 100;
    color: var(--color-text-light);
    font-family: var(--font-family-base);
    font-weight: var(--font-weight-regular);
}

.ic-header-anchor { height: 0; pointer-events: none; }
.ic-header--sticky { background: var(--color-primary); }
.ic-header--sticky-enter:not(.ic-header--overlay-open) {
    animation: ic-navigation-sticky-enter 300ms ease-out;
}
@keyframes ic-navigation-sticky-enter {
    from { transform: translateY(-16px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
/* WordPress fixes the toolbar above 600px; below that it scrolls away. */
@media (min-width: 783px) {
    .admin-bar .ic-header { top: 32px; }
}
@media (min-width: 601px) and (max-width: 782px) {
    .admin-bar .ic-header { top: 46px; }
}
@media (prefers-reduced-motion: reduce) {
    .ic-header--sticky-enter:not(.ic-header--overlay-open) { animation: none; }
}

.ic-header [hidden] { display: none !important; }

.ic-header__bar {
    position: relative;
    display: flex;
    align-items: center;
    gap: 30px;
    min-height: 88px;
    border-bottom: 1px solid var(--color-border-subtle);
}

.ic-header__brand {
    display: block;
    flex: 0 0 211px;
    padding: 7px 5px;
    border-radius: 4px;
}

.ic-header__brand .ic-header__logo { display: none; width: 201px; height: 54px; }
.ic-header__brand .ic-header__logo--desktop { display: block; }
.ic-header__brand .ic-header__slogan path { fill: var(--color-text-dark); }

/* Preserve the previously scaled artwork's size/position without raster scaling. */
.ic-header:not(.ic-header--compact) .ic-header__brand {
    min-width: 0;
    padding-inline: 6px;
}

.ic-header__nav {
    display: flex;
    align-items: center;
    gap: 30px;
    flex: 1 1 auto;
    min-width: 0;
    justify-content: flex-end;
}

.ic-header ul { padding: 0; margin: 0; list-style: none; }
.ic-header__menu { display: flex; align-items: center; gap: 30px; }
.ic-header__item { min-width: 0; }
.ic-header__root { display: flex; align-items: center; }
.ic-header__link {
    display: inline-flex;
    color: inherit;
    font-size: var(--font-size-navigation);
    line-height: normal;
    letter-spacing: .02em;
    text-decoration: none;
    overflow-wrap: anywhere;
}
.ic-header__root > .ic-header__link { white-space: nowrap; }
.ic-header__link:hover { text-decoration: underline; }
.ic-header .ic-header__action {
    color: var(--color-text-charcoal);
    font-size: var(--font-size-button);
    min-height: 37px;
    padding: 10px 14px;
}
.ic-header__disclosure,
.ic-header__menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
}
.ic-header__disclosure { min-width: 24px; min-height: 44px; }
.ic-header__disclosure[aria-expanded="true"] > img { rotate: 180deg; }
.ic-header__social { display: flex; gap: 16px; flex-shrink: 0; }
.ic-header__social a { display: inline-flex; align-items: center; min-height: 44px; }
/* Each root owns its panel; the bar is its positioning container. */
.ic-header:not(.ic-header--compact) .ic-header__root > .ic-header__dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: min(320px, 100%);
    padding: var(--spacing-md);
    background: var(--color-primary-muted);
    color: var(--color-text-light);
    border: 1px solid var(--color-border-inverse-subtle);
    border-radius: var(--radius-card);
}
.ic-header__sub-menu { display: grid; gap: 0; }
.ic-header__sub-menu > .ic-header__item {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
}
.ic-header__sub-menu > .ic-header__item:not(:last-child) {
    border-bottom: 1px solid var(--color-border-inverse-subtle);
}
.ic-header__sub-menu .ic-header__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-width: 0;
    min-height: 48px;
    padding-block: 12px;
    font-size: var(--font-size-navigation);
    line-height: var(--line-height-list);
    letter-spacing: normal;
}
.ic-header__sub-menu .ic-header__link > span { min-width: 0; }
.ic-header__sub-menu > .ic-header__item:first-child > .ic-header__link {
    padding-top: 0;
}
.ic-header__sub-menu > .ic-header__item:last-child > .ic-header__link {
    padding-bottom: 0;
}
.ic-header__sub-menu .ic-header__link::after {
    content: '';
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    background: var(--color-secondary);
    mask: url('../images/navigation-arrow.svg') center / contain no-repeat;
    transform: rotate(45deg);
    transition: translate 160ms ease;
}
.ic-header__sub-menu .ic-header__link:hover,
.ic-header__sub-menu .ic-header__link:focus-visible { color: var(--color-text-light); text-decoration: none; }
.ic-header__sub-menu .ic-header__link:hover::after,
.ic-header__sub-menu .ic-header__link:focus-visible::after { translate: 3px 0; }
.ic-header__sub-menu .ic-header__link:focus-visible { outline-color: var(--color-secondary); }
.ic-header__sub-menu .ic-header__link[aria-current="page"] { text-decoration: underline; text-underline-offset: .2em; }
.ic-header__sub-menu .ic-header__disclosure { grid-column: 2; grid-row: 1; }
.ic-header__sub-menu .ic-header__dropdown {
    grid-column: 1 / -1;
    margin-top: 12px;
    padding-left: var(--spacing-md);
    border-left: 1px solid var(--color-border-inverse-subtle);
}
.ic-header__root:has(> .ic-header__disclosure[aria-expanded="true"]) > .ic-header__link:not(.ic-header__action) {
    text-decoration: underline;
    text-decoration-color: var(--color-secondary);
    text-underline-offset: .3em;
}
.ic-header__disclosure > img { display: none; }
.ic-header__disclosure::before {
    content: '';
    width: 10px;
    height: 10px;
    background: currentColor;
    mask: url('../images/navigation-chevron.svg') center / contain no-repeat;
}
.ic-header__disclosure[aria-expanded="true"]::before { rotate: 180deg; background: var(--color-secondary); }
.ic-header a:focus-visible,
.ic-header button:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 4px;
}

/* Default/no-JS and content-aware compact navigation stay in normal flow. */
.ic-header--compact .ic-header__bar { flex-wrap: wrap; gap: 16px; padding-block: 16px; }
.ic-header--compact .ic-header__brand { flex: 0 0 auto; padding: 0; }
.ic-header--compact .ic-header__nav { flex: 1 0 100%; display: grid; gap: var(--spacing-md); }
.ic-header--compact .ic-header__menu { display: grid; gap: 0; }
.ic-header--compact .ic-header__root {
    flex-wrap: wrap;
    padding-block: 14px;
    border-bottom: 1px solid var(--color-border-subtle);
}
.ic-header--compact .ic-header__root > .ic-header__link {
    flex: 1 1 0;
    min-width: 0;
    white-space: normal;
    line-height: var(--line-height-list);
}
.ic-header--compact .ic-header__root > .ic-header__action { flex: 0 1 auto; max-width: 100%; }
.ic-header--compact .ic-header__root > .ic-header__dropdown {
    flex: 1 0 100%;
    min-width: 0;
    margin-top: calc(1.5 * var(--spacing-xs));
    padding: calc(2 * var(--spacing-xs));
    background: var(--color-primary-muted);
    color: var(--color-text-light);
    border: 1px solid var(--color-border-inverse-subtle);
    border-radius: var(--radius-card);
}
.ic-header--compact .ic-header__root:not(:has(> .ic-header__action)) {
    border-bottom-color: var(--color-border-inverse-subtle);
}
.ic-header--compact .ic-header__root:has(> .ic-header__disclosure[aria-expanded="true"]) > .ic-header__link:not(.ic-header__action) {
    text-decoration: none;
}
.ic-header--compact .ic-header__root > .ic-header__disclosure::before {
    width: 14px;
    height: 14px;
    background: var(--color-secondary);
    transition: rotate 160ms ease-out;
}
.ic-header--compact .ic-header__menu-toggle { margin-left: auto; }
.ic-header--compact .ic-header__social { justify-content: flex-end; }
.ic-header:not(.ic-header--enhanced) .ic-header__disclosure { display: none; }

/* Match the previous picture sources even at fractional CSS viewport widths. */
@media (max-width: 1023px) {
    .ic-header__brand .ic-header__logo--desktop { display: none; }
    .ic-header__brand .ic-header__logo--tablet { display: block; }
}
@media (max-width: 700px) {
    .ic-header__brand .ic-header__logo--tablet { display: none; }
    .ic-header__brand .ic-header__logo--mobile { display: block; width: 150px; height: 40px; }
    .ic-header--compact .ic-header__bar { min-height: 77px; }
}
@media (min-width: 701px) and (max-width: 1023px) {
    .ic-header__brand .ic-header__logo--tablet { display: block; width: 187px; height: 50px; }
    .ic-header--compact .ic-header__menu { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--spacing-md); align-items: start; }
}

/* Compact navigation is a viewport layer; the closed header stays in flow. */
.ic-header--enhanced.ic-header--compact .ic-header__nav {
    position: fixed;
    inset: var(--ic-navigation-admin-offset, 0px) 0 0;
    z-index: 1;
    display: grid;
    align-content: start;
    justify-content: stretch;
    padding: calc(var(--ic-navigation-bar-height, 77px) + var(--spacing-md)) var(--container-padding) var(--spacing-md);
    background: var(--color-primary);
    overflow-y: auto;
    scrollbar-gutter: stable;
    overscroll-behavior: contain;
}
.ic-header--overlay-open { min-height: var(--ic-navigation-bar-height); }
.ic-header--overlay-open .ic-header__bar {
    position: fixed;
    top: var(--ic-navigation-admin-offset, 0px);
    left: 0;
    right: var(--ic-navigation-scrollbar-width, 0px);
    z-index: 2;
    width: calc(100% - var(--ic-navigation-scrollbar-width, 0px));
    max-width: var(--container-width-wide);
    margin-inline: auto;
    padding-inline: var(--container-padding);
    background: var(--color-primary);
}
.ic-header--overlay-open .ic-header__brand,
.ic-header--overlay-open .ic-header__menu-toggle {
    position: relative;
    z-index: 3;
}
.ic-header--overlay-open .ic-header__bar::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    background: var(--color-primary);
    pointer-events: none;
}
.ic-header__menu-icon {
    position: relative;
    display: block;
    width: 40px;
    height: 40px;
    border: 1px solid rgb(255 255 255 / 22%);
    border-radius: var(--radius-pill);
}
.ic-header__menu-icon > span {
    position: absolute;
    left: 9px;
    top: 18px;
    width: 20px;
    height: 1px;
    background: currentColor;
    transition: transform 180ms ease, opacity 180ms ease;
}
.ic-header__menu-icon > span:first-child { transform: translateY(-6px); }
.ic-header__menu-icon > span:last-child { transform: translateY(6px); }
.ic-header__menu-toggle[aria-expanded="true"] .ic-header__menu-icon > span:first-child { transform: rotate(45deg); }
.ic-header__menu-toggle[aria-expanded="true"] .ic-header__menu-icon > span:nth-child(2) { opacity: 0; }
.ic-header__menu-toggle[aria-expanded="true"] .ic-header__menu-icon > span:last-child { transform: rotate(-45deg); }
@media (min-width: 701px) {
    .ic-header--enhanced.ic-header--compact .ic-header__nav,
    .ic-header--overlay-open .ic-header__bar { padding-inline: var(--spacing-xl); }
}
@media (min-width: 1024px) {
    .ic-header__brand .ic-header__logo--desktop { display: block; width: 187px; height: auto; }
    .ic-header:not(.ic-header--compact) .ic-header__logo--desktop { width: calc(187px * 1.2); }
    .ic-header--enhanced.ic-header--compact .ic-header__nav,
    .ic-header--overlay-open .ic-header__bar { padding-inline: var(--container-padding-wide); }
}
@media (prefers-reduced-motion: reduce) {
    .ic-header__menu-icon > span { transition: none; }
    .ic-header--compact .ic-header__root > .ic-header__disclosure::before { transition: none; }
    .ic-header__sub-menu .ic-header__link::after { transition: none; }
    .ic-header__sub-menu .ic-header__link:hover::after,
    .ic-header__sub-menu .ic-header__link:focus-visible::after { translate: none; }
}
