/* October's shared header: clear destinations and spacious disclosure menus. */
.site-header.october-header {
    position: relative;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 82px;
    gap: 24px;
    padding: 10px 5%;
    background: var(--house-ink);
    border-bottom: 1px solid var(--house-rule);
}

@media (min-width: 861px) {
    .october-header .site-nav .october-menu { inset-inline: auto 5%; width: min(900px, 90%); padding: 16px 24px 20px; border: 1px solid var(--house-rule); border-top: 0; border-radius: 0 0 8px 8px; }
    /* Let enlarged text wrap as a group instead of pushing account controls
       beyond the viewport. Normal-size navigation keeps its single row. */
    .october-header .site-nav { flex: 1 1 auto; min-width: 0; }
    .october-header .primary-nav { flex-wrap: wrap; justify-content: flex-end; min-width: 0; }
}
body.house-brand .october-header .site-nav .october-menu .nav-panel-section h2 { font-size: 13px; color: var(--house-muted); font-weight: 400 !important; }
body.house-brand .october-header .site-nav .october-menu .nav-panel-section a { font-weight: 400; }
.october-header .site-brand { flex: 0 0 auto; }
.october-header .site-brand img {
    display: block;
    width: 154px;
    height: auto;
    max-height: none;
    aspect-ratio: 3.5;
    object-fit: cover;
}
.october-header .header-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 14px; }
.october-header .header-subscribe {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-width: 44px;
    min-height: 44px;
    padding: 10px 15px;
    border: 1px solid var(--house-gold);
    border-radius: 999px;
    background: var(--house-gold);
    color: var(--house-ink);
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    text-decoration: none;
    white-space: nowrap;
}
.october-header .header-subscribe:hover { background: #f0d495; border-color: #f0d495; color: var(--house-ink); }
.october-header .site-nav {
    position: static;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: auto;
    gap: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: var(--house-text);
    font-family:var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
}
.october-header .primary-nav { display: flex; gap: 3px; }
.october-header .primary-nav > li { position: static; }
.october-header .primary-nav > li > a,
.october-header .nav-dropdown summary {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 9px;
    color: var(--house-text);
    font:inherit;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: .09em;
    text-transform: uppercase;
    white-space: nowrap;
    border: 0;
}
.october-header .nav-dropdown summary::after { display: none; }
.october-header .nav-dropdown summary::marker { content: ''; }
.october-header .nav-dropdown details[open] > summary,
.october-header .primary-nav > li > a:hover,
.october-header .nav-dropdown summary:hover { color: var(--house-gold); }
.october-header .october-house-nav summary {
    padding: 10px 15px;
    margin-left: 8px;
    border: 1px solid #786d54;
    border-radius: 999px;
}
.october-header .october-menu {
    position: absolute;
    inset: 100% 0 auto;
    display: block;
    width: 100%;
    min-width: 0;
    max-height: min(620px, calc(100dvh - 115px));
    overflow-y: auto;
    margin: 0;
    padding: 16px 5% 20px;
    border: 0;
    border-bottom: 1px solid var(--house-rule);
    border-radius: 0;
    background: var(--house-ink);
    box-shadow: 0 12px 24px #0003;
    font-weight: 400;
}
.october-header .october-menu-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 10px;
}
.october-header .october-menu-heading p {
    margin: 0;
    color: var(--house-muted);
    font-size: 11px;
    line-height: 1.5;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.october-header .october-menu-heading button {
    min-height: 44px;
    padding: 8px 15px;
    border: 1px solid #566373;
    border-radius: 999px;
    background: transparent;
    color: var(--house-text);
    font:inherit;
    font-size: 12px;
    white-space: nowrap;
    cursor: pointer;
}
.october-header .october-menu-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px;
}
.october-header .october-menu-courses { grid-template-columns: 1.2fr repeat(3, minmax(0, 1fr)); }
.october-header .nav-panel-section {
    display: grid;
    align-content: start;
    gap: 0;
    width: auto;
    padding: 0 0 0 22px;
    border: 0;
    border-left: 1px solid #354553;
    grid-template-columns: 1fr;
}
.october-header .nav-panel-section:first-child { border-left: 0; padding-left: 0; }
.october-header .nav-panel-section h2 {
    margin: 0 0 10px;
    color: var(--house-gold);
    font-family:var(--font-sans);
    font-size: 13px;
    line-height: 1.4;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
}
.october-header .nav-panel-section p {
    max-width: 34ch;
    margin: 0 0 12px;
    color: var(--house-muted);
    font-size: 13px;
    line-height: 1.55;
}
.october-header .nav-panel-section a {
    display: block;
    width: fit-content;
    max-width: 100%;
    min-height: 44px;
    min-width: 44px;
    padding: 7px 0;
    border: 0;
    border-radius: 0;
    color: var(--house-text);
    font-size: 13px;
    line-height: 1.5;
}
.october-header .nav-panel-section a:hover {
    background: transparent;
    color: var(--house-gold);
    text-decoration: underline;
    text-underline-offset: 4px;
}
.october-header .nav-panel-section.october-menu-feature {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}
.october-header .october-menu-feature h2 {
    color: var(--house-text);
    font-family:var(--font-serif);
    font-size: 28px;
    line-height: 1.12;
}
.october-header .october-menu-feature a { color: var(--house-gold); font-weight: 600; }
.october-header :is(a, button, summary):focus-visible { outline: 2px solid var(--house-gold); outline-offset: 4px; }
.october-header :is(a, button, summary) { touch-action: manipulation; }
@media (min-width: 861px) and (max-width: 1080px) {
    .site-header.october-header { padding-inline: 3%; gap: 16px; }
    .october-header .site-brand img { width: 148px; }
    .october-header .site-nav { font-size: 12px; }
    .october-header .primary-nav > li > a,
    .october-header .nav-dropdown summary { padding-inline: 7px; font-size: 11px; letter-spacing: .07em; }
    .october-header .october-house-nav summary { padding-inline: 12px; }
    .october-header .october-menu-courses { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
    .site-header.october-header { flex-wrap: wrap; min-height: 72px; padding: 9px 5%; gap: 14px; }
    .october-header .site-brand img { width: 148px; }
    .october-header .site-brand { margin-right: auto; }
    .october-header .nav-toggle { display: block; border-radius: 999px; width: 44px; height: 44px; }
    .october-header .site-nav {
        display: none;
        flex-basis: 100%;
        width: 100%;
        max-height: calc(100dvh - 125px);
        overflow: auto;
        border-top: 1px solid var(--house-rule);
        padding-top: 10px;
    }
    .october-header .site-nav.is-open { display: block; }
    .october-header .primary-nav { display: grid; gap: 0; }
    .october-header .primary-nav > li > a,
    .october-header .nav-dropdown summary { min-height: 48px; padding: 12px 8px; font-size: 13px; }
    .october-header .october-house-nav summary { width: fit-content; margin: 8px 0 0; padding-inline: 18px; }
    .october-header .october-menu {
        position: static;
        width: 100%;
        max-height: none;
        margin: 4px 0 14px;
        padding: 18px;
        border: 1px solid #354553;
        border-radius: 5px;
        box-shadow: none;
    }
    .october-header .october-menu-grid,
    .october-header .october-menu-courses { grid-template-columns: 1fr 1fr; gap: 25px 18px; }
    .october-header .nav-panel-section { padding: 0; border: 0; }
    .october-header .nav-panel-section.october-menu-feature { grid-column: 1 / -1; }
    .october-header .nav-panel-section a { min-height: 44px; min-width: 44px; }
}
@media (max-width: 450px) {
    .october-header .october-menu-grid,
    .october-header .october-menu-courses { grid-template-columns: 1fr; }
    .october-header .october-menu-heading { align-items: flex-start; gap: 12px; }
    .october-header .october-menu-heading button { padding-inline: 11px; }
}
@media (max-width: 360px) {
    .site-header.october-header { column-gap: 8px; }
    .october-header .header-actions { gap: 8px; }
    .october-header .site-brand img { width: 120px; }
    .october-header .header-subscribe { padding-inline: 12px; }
}
@media (forced-colors: active) {
    .october-header .header-subscribe { color: ButtonText; background: ButtonFace; border-color: ButtonText; }
    /* Borders remain visible when the system suppresses bar backgrounds. */
    .october-header .nav-toggle span {
        box-sizing: border-box;
        border-top: 2px solid ButtonText;
        background: none;
    }
}

/* Keep the full imprint name within its normal-size main-navigation slot. */
.october-header .primary-nav > li > a.october-bors-main-link { max-width: 150px; white-space: normal; }
@media (max-width: 860px) {
    .october-header .primary-nav > li > a.october-bors-main-link { max-width: 100%; }
}

/* Courses and Shop expose their existing destinations as compact link lists. */
.october-header .october-menu-links-only .october-menu-heading {
    justify-content: flex-end;
    margin-bottom: 0;
}
.october-header .october-menu-links-only .october-menu-link-list {
    margin: 0;
    padding: 0;
    border: 0;
    list-style: none;
}
@media (min-width: 861px) {
    .october-header .site-nav .october-menu.october-menu-links-only {
        width: min(380px, 90%);
    }
}
