/* Header compositions intentionally differ by theme; navigation remains shared and accessible. */
@media (min-width: 1281px) {
    .theme-universal .site-header .bar {
        display: grid;
        grid-template-columns: max-content minmax(0, 1fr) max-content;
        grid-template-areas: "brand nav tools";
        gap: 18px;
        flex-wrap: initial;
    }
    .theme-universal .brand { grid-area: brand; }
    .theme-universal .main-nav { grid-area: nav; min-width: 0; justify-self: center; flex: initial; }
    .theme-universal .main-nav ul { justify-content: center; }
    .theme-universal .bar-tools { grid-area: tools; flex-wrap: nowrap; }

    .theme-portfolio .site-header .bar,
    .theme-newsroom .site-header .bar,
    .theme-vlog .site-header .bar {
        display: grid;
        grid-template-columns: 1fr max-content 1fr;
        gap: 0 18px;
        flex-wrap: initial;
        padding-top: 0;
    }
    .theme-portfolio .site-header .bar { grid-template-areas: "brand . tools" "nav nav nav"; }
    .theme-newsroom .site-header .bar { grid-template-areas: "nav nav nav" ". brand tools"; }
    .theme-vlog .site-header .bar { grid-template-areas: ". brand tools" "nav nav nav"; }
    .theme-portfolio .brand, .theme-newsroom .brand, .theme-vlog .brand { grid-area: brand; justify-self: center; padding-block: 12px; }
    .theme-portfolio .brand { justify-self: start; }
    .theme-portfolio .main-nav, .theme-newsroom .main-nav, .theme-vlog .main-nav {
        grid-area: nav;
        width: 100%;
        min-width: 0;
        border-bottom: 1px solid var(--line);
        flex: initial;
    }
    .theme-portfolio .main-nav ul, .theme-newsroom .main-nav ul, .theme-vlog .main-nav ul { justify-content: center; }
    .theme-portfolio .bar-tools, .theme-newsroom .bar-tools, .theme-vlog .bar-tools { grid-area: tools; justify-self: end; flex-wrap: nowrap; }
    .theme-newsroom .site-header { border-bottom: 0; }
    .theme-newsroom .main-nav { background: #25231f; border-bottom: 3px solid var(--primary); }
    .theme-newsroom .main-nav a { color: #fffefa; }
    .theme-newsroom .main-nav a:hover { background: rgba(255,255,255,.1); }
    .theme-newsroom .brand { font: 800 1.8rem/1 var(--font-head); letter-spacing: -.05em; }
    .theme-newsroom .brand-mark { display: none; }
    .theme-vlog .main-nav { border-top: 1px solid var(--line); border-bottom: 0; }

    .theme-agency .site-header .bar,
    .theme-studio .site-header .bar {
        display: grid;
        grid-template-columns: max-content 1fr max-content;
        gap: 0 24px;
        flex-wrap: initial;
        padding-top: 0;
    }
    .theme-agency .site-header .bar { grid-template-areas: "nav nav nav" "brand . tools"; }
    .theme-studio .site-header .bar { grid-template-columns: max-content minmax(0, 1fr) max-content; grid-template-areas: "brand nav tools"; }
    .theme-agency .brand, .theme-studio .brand { grid-area: brand; }
    .theme-agency .main-nav, .theme-studio .main-nav { grid-area: nav; min-width: 0; flex: initial; }
    .theme-agency .main-nav { width: 100%; border-bottom: 1px solid var(--line); }
    .theme-agency .main-nav ul { justify-content: center; }
    .theme-studio .main-nav { width: 100%; }
    .theme-studio .main-nav ul { justify-content: flex-end; }
    .theme-agency .bar-tools, .theme-studio .bar-tools { grid-area: tools; flex-wrap: nowrap; }
    .theme-agency .bar-tools { justify-self: end; padding-block: 10px; }

    .theme-cafe .site-header .bar,
    .theme-signs .site-header .bar {
        display: grid;
        grid-template-columns: 1fr max-content 1fr;
        gap: 0 18px;
        flex-wrap: initial;
        padding-top: 0;
    }
    .theme-cafe .site-header .bar { grid-template-areas: ". brand tools" "nav nav nav"; }
    .theme-signs .site-header .bar { grid-template-areas: "tools brand ." "nav nav nav"; }
    .theme-cafe .brand, .theme-signs .brand { grid-area: brand; justify-self: center; padding-block: 12px; }
    .theme-cafe .brand { font: 800 1.5rem/1 var(--font-head); }
    .theme-signs .brand { font-size: 1.45rem; }
    .theme-cafe .main-nav, .theme-signs .main-nav { grid-area: nav; width: 100%; min-width: 0; flex: initial; }
    .theme-cafe .main-nav { border-top: 1px solid var(--line); }
    .theme-cafe .main-nav ul, .theme-signs .main-nav ul { justify-content: center; padding-block: 5px; }
    .theme-cafe .bar-tools, .theme-signs .bar-tools { grid-area: tools; justify-self: end; flex-wrap: nowrap; }
    .theme-signs .site-header { background: var(--header-bg); color: var(--header-ink); }
    .theme-signs .main-nav { border-top: 1px solid rgba(255,255,255,.2); }

    .theme-travel .site-header .bar,
    .theme-neutral .site-header .bar,
    .theme-courses .site-header .bar {
        display: grid;
        grid-template-columns: 1fr max-content;
        gap: 0 18px;
        flex-wrap: initial;
        padding-top: 0;
    }
    .theme-travel .site-header .bar { grid-template-columns: 1fr max-content 1fr; grid-template-areas: "nav nav nav" "tools brand ."; }
    .theme-neutral .site-header .bar { grid-template-areas: "brand tools" "nav nav"; }
    .theme-courses .site-header .bar { grid-template-areas: "brand tools" "nav nav"; }
    .theme-travel .brand, .theme-neutral .brand, .theme-courses .brand { grid-area: brand; padding-block: 10px; }
    .theme-travel .main-nav, .theme-neutral .main-nav, .theme-courses .main-nav {
        grid-area: nav;
        min-width: 0;
        width: 100%;
        border-top: 1px solid var(--line);
        flex: initial;
    }
    .theme-courses .main-nav ul { justify-content: flex-start; }
    .theme-neutral .main-nav ul { justify-content: flex-start; padding-block: 5px; }
    .theme-travel .bar-tools, .theme-neutral .bar-tools, .theme-courses .bar-tools { grid-area: tools; justify-self: end; flex-wrap: nowrap; }
    .theme-courses .main-nav { border-top: 2px solid var(--ink); }
    .theme-courses .main-nav a.active { box-shadow: inset 0 -3px 0 var(--ink); }

    .theme-editorial .site-header .bar {
        display: grid;
        grid-template-columns: 1fr max-content 1fr;
        grid-template-areas: ". brand tools" "nav nav nav";
        gap: 0 18px;
        flex-wrap: initial;
        padding-top: 0;
    }
    .theme-editorial .brand { grid-area: brand; justify-self: center; padding-block: 16px; font-size: 1.65rem; }
    .theme-editorial .brand-mark { display: none; }
    .theme-editorial .main-nav { grid-area: nav; width: 100%; min-width: 0; border-top: 1px solid rgba(255,255,255,.18); flex: initial; }
    .theme-editorial .main-nav ul { justify-content: center; }
    .theme-editorial .bar-tools { grid-area: tools; justify-self: end; flex-wrap: nowrap; }
    .theme-editorial .article-head { max-width: 900px; margin: 0 auto 28px; padding: 24px 0; border-bottom: 1px solid var(--line); text-align: center; }
    .theme-newsroom .article-head { max-width: 900px; margin: 0 auto 32px; padding: 30px 0; border-bottom: 3px double var(--ink); text-align: center; }
    .theme-portfolio .article-head { max-width: 960px; margin: 0 auto 28px; text-align: center; }

    .theme-cinema .site-header .bar {
        display: grid;
        grid-template-columns: max-content minmax(0,1fr);
        grid-template-areas: "brand nav" "brand tools";
        gap: 0 26px;
        flex-wrap: initial;
    }
    .theme-cinema .brand { grid-area: brand; align-self: center; }
    .theme-cinema .main-nav { grid-area: nav; min-width: 0; flex: initial; }
    .theme-cinema .main-nav ul { justify-content: flex-end; }
    .theme-cinema .bar-tools { grid-area: tools; justify-self: end; flex-wrap: nowrap; }
    .theme-cinema .site-header { padding-block: 6px; }

    .theme-portfolio .main-nav { border-top: 1px solid var(--line); border-bottom: 0; }
    .theme-travel .main-nav { border-bottom: 1px solid var(--line); border-top: 0; }
    .theme-travel .main-nav ul { justify-content: center; }
}

@media (min-width: 561px) and (max-width: 1280px) {
    .theme-portfolio .site-header .bar,
    .theme-newsroom .site-header .bar,
    .theme-vlog .site-header .bar,
    .theme-cafe .site-header .bar,
    .theme-signs .site-header .bar,
    .theme-editorial .site-header .bar {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        grid-template-areas: ". brand toggle" "tools tools tools" "nav nav nav";
        align-items: center;
        gap: 0 12px;
    }
    .theme-portfolio .brand, .theme-newsroom .brand, .theme-vlog .brand,
    .theme-cafe .brand, .theme-signs .brand, .theme-editorial .brand { grid-area: brand; justify-self: center; margin: 0; }
    .theme-portfolio .nav-toggle, .theme-newsroom .nav-toggle, .theme-vlog .nav-toggle,
    .theme-cafe .nav-toggle, .theme-signs .nav-toggle, .theme-editorial .nav-toggle { grid-area: toggle; justify-self: end; margin: 0; }
    .theme-portfolio .bar-tools, .theme-newsroom .bar-tools, .theme-vlog .bar-tools,
    .theme-cafe .bar-tools, .theme-signs .bar-tools, .theme-editorial .bar-tools { grid-area: tools; width: 100%; }
    .theme-portfolio .main-nav, .theme-newsroom .main-nav, .theme-vlog .main-nav,
    .theme-cafe .main-nav, .theme-signs .main-nav, .theme-editorial .main-nav { grid-area: nav; width: 100%; }
    .theme-portfolio .main-nav.open, .theme-newsroom .main-nav.open, .theme-vlog .main-nav.open,
    .theme-cafe .main-nav.open, .theme-signs .main-nav.open, .theme-editorial .main-nav.open { display: block; }
    .theme-newsroom .main-nav { background: #25231f; }
    .theme-newsroom .main-nav a { color: #fffefa; }
    .theme-editorial .main-nav { background: #29251f; }
    .theme-editorial .main-nav a { color: #fffdf8; }
}

@media (max-width: 560px) {
    .theme-portfolio .site-header .bar,
    .theme-newsroom .site-header .bar,
    .theme-vlog .site-header .bar,
    .theme-cafe .site-header .bar,
    .theme-signs .site-header .bar,
    .theme-editorial .site-header .bar {
        grid-template-columns: 1fr auto;
        grid-template-areas: "brand toggle" "tools tools" "nav nav";
    }
    .theme-portfolio .brand, .theme-newsroom .brand, .theme-vlog .brand,
    .theme-cafe .brand, .theme-signs .brand, .theme-editorial .brand { justify-self: start; }
}

@media (min-width: 1281px) {
    .theme-minimal .site-header {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 50;
        width: 236px;
        border-right: 1px solid var(--line);
        border-bottom: 0;
    }
    .theme-minimal .site-header .bar {
        display: flex;
        width: 100%;
        height: 100%;
        max-width: none;
        flex-direction: column;
        align-items: stretch;
        gap: 24px;
        padding: 28px 20px;
    }
    .theme-minimal .brand { align-items: flex-start; }
    .theme-minimal .main-nav { display: block; flex: initial; }
    .theme-minimal .main-nav ul { flex-direction: column; gap: 8px; }
    .theme-minimal .main-nav a { width: 100%; justify-content: flex-start; border-bottom: 1px solid var(--line); border-radius: 0; padding: 11px 2px; }
    .theme-minimal .bar-tools { flex-direction: column; align-items: stretch; margin-top: auto; }
    .theme-minimal .hdr-search input { width: 100px; }
    .theme-minimal .site-main, .theme-minimal .site-footer { margin-left: 236px; }
    .theme-minimal .site-main > .wrap { --maxw: 1000px; }
}

@media (max-width: 1280px) {
    .theme-minimal .site-header { position: sticky; inset: auto; width: auto; border-right: 0; border-bottom: 1px solid var(--line); }
    .theme-minimal .site-header .bar { display: flex; width: min(100% - 2 * var(--gutter), var(--maxw)); height: auto; max-width: var(--maxw); flex-direction: row; align-items: center; gap: 10px 16px; padding-block: 8px; }
    .theme-minimal .main-nav { display: none; }
    .theme-minimal .main-nav.open { display: block; }
    .theme-minimal .main-nav ul { flex-direction: column; }
    .theme-minimal .main-nav a { width: 100%; }
    .theme-minimal .bar-tools { flex-direction: row; align-items: center; margin-top: 0; }
    .theme-minimal .site-main, .theme-minimal .site-footer { margin-left: 0; }
}
