/* Approved header proportions. Keep original logo, menu controls and row height. */
#landscape-header { --oc-header-icon-size: 50px; --oc-header-icon-padding: 10px; }
#portrait-header { --oc-header-icon-size: 28px; --oc-header-icon-padding: 8px; }
#landscape-header #social-nav .horizontal li,
#portrait-header #social-nav .horizontal li {
    padding-left: var(--oc-header-icon-padding);
    padding-right: var(--oc-header-icon-padding);
}
#landscape-header #social-nav a,
#portrait-header #social-nav a,
#mailing-list-header-icon a {
    position: relative; display: inline-block; vertical-align: middle;
    width: var(--oc-header-icon-size); height: 50px;
}
#mailing-list-header-icon a { width: 40px; height: 40px; }
#landscape-header #social-nav a::after,
#portrait-header #social-nav a::after,
#mailing-list-header-icon a::after {
    content: ""; position: absolute; width: 44px; height: 44px;
    top: 50%; left: 50%; transform: translate(-50%, -50%);
}
#landscape-header #social-nav img,
#portrait-header #social-nav img,
#mailing-list-header-icon img {
    position: absolute; left: 50%; top: 50%; height: auto;
    width: var(--oc-header-icon-size); max-width: none;
    transform: translate(-50%, -50%);
}
/* Keep the 44px envelope target inside the screen when its 40px slot is flush
   with the mobile header's right edge. The visible artwork stays centered. */
#mailing-list-header-icon a::after { margin-left: -2px; }

/* One state-driven toggle, inspired by the supplied three-line/X reference. */
#mobile-nav-toggle {
    appearance: none; border: 0; border-radius: 0; background: transparent;
    color: #4b4b4b; cursor: pointer; padding: 0; margin: 0;
    width: 44px; height: 44px; min-width: 44px; line-height: 1;
}
#mobile-nav-toggle:focus-visible { outline: 2px solid #993300; outline-offset: -2px; }
.oc-nav-symbol { display: block; position: relative; width: 32px; height: 32px; margin: auto; }
.oc-nav-symbol > span {
    position: absolute; display: block; width: 26px; height: 3px; left: 3px;
    background: currentColor; transform-origin: center;
    transition: transform 280ms cubic-bezier(.4,0,.2,1), opacity 180ms ease;
}
.oc-nav-symbol > span:nth-child(1) { top: 7px; }
.oc-nav-symbol > span:nth-child(2) { top: 15px; }
.oc-nav-symbol > span:nth-child(3) { top: 23px; }
.is-nav-open .oc-nav-symbol > span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.is-nav-open .oc-nav-symbol > span:nth-child(2) { transform: scaleX(0); opacity: 0; }
.is-nav-open .oc-nav-symbol > span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
@media only screen and (max-width: 479px) {
    #portrait-header {
        position: sticky; top: 0; z-index: 1100; isolation: isolate; float: none;
        width: 100vw; max-width: none;
        margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw);
        background: #fff; box-shadow: 0 2px 4px rgb(0 0 0 / .12);
    }
    #portrait-header .oc-mobile-header-row {
        float: none; display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px;
        gap: 10px; align-items: center; width: 100%; min-height: 60px;
        padding: 0 max(8px, env(safe-area-inset-right)) 0 max(8px, env(safe-area-inset-left));
    }
    #portrait-header .oc-mobile-header-row #logo {
        float: none; width: 100%; max-width: 50vw; justify-self: center;
        margin: 0; line-height: 0;
    }
    #portrait-header #mailing-list-header-icon {
        float: none; margin: 0; line-height: 0; justify-self: center;
    }
    #portrait-header #hideable-menu {
        display: grid; grid-template-rows: 0fr;
        transition: grid-template-rows 280ms cubic-bezier(.4,0,.2,1);
    }
    #portrait-header.is-nav-open #hideable-menu { grid-template-rows: 1fr; }
    .oc-mobile-nav-content { min-height: 0; overflow: hidden; }
    .oc-mobile-nav-inner {
        display: flow-root; padding: 12px 20px 16px;
        max-height: calc(100dvh - 60px); overflow-y: auto; box-sizing: border-box;
        opacity: 0; transform: translateY(-8px);
        transition: opacity 200ms ease, transform 280ms cubic-bezier(.4,0,.2,1);
    }
    .is-nav-open .oc-mobile-nav-inner { opacity: 1; transform: translateY(0); }
    #portrait-header #main-nav-wrap { height: auto; display: flow-root; }
    #portrait-header .upper-hr { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    #portrait-header #hideable-menu, .oc-mobile-nav-inner, .oc-nav-symbol > span { transition: none; }
}
